* Imports from Jan to Aug down 31.3 pct on year
* Currency devaluation erodes competitiveness of imports
* Exports rise 29.3 percent (Adds detail, background)
BEIJING, Sept 8 (Reuters) - China, the world's largest coal buyer, imported 17.49 million tonnes of the fuel in August, down 17.7 percent from July, with already weak demand affected by a currency devaluation that made foreign coal more expensive.
China has been trying to tackle an immense supply glut that has weighed on prices. As well as urging big local producers to cut output, it has drawn up new quality standards aimed at restricting low-grade imports.
Imports had staged a recovery in July when domestic miners chose to cut production in order to minimise losses, allowing lower-cost foreign suppliers to take advantage. Industry estimates suggest that more than half of China's mining firms either cut output or suspended operations completely in July.
July imports hit an eight-month high of 21.26 million tonnes, but the seasonal demand peak has finished and foreign coal is now more expensive as a result of the currency devaluation, meaning that imports could decline further in the coming months.
"Under the impact of the devaluation, the price advantages of imported coal will gradually narrow, and we are forecasting imports coming under further pressure in September," said analysts with Guangfa Securities.
Imports for the first eight months of the year, including low-grade lignite, were down 31.3 percent compared to last year at 138.6 million tonnes.
Local prices have inched down further in early September, with thermal coal at the port of Qinhuangdao SH-QHA-TRMCOAL selling at 405 yuan ($63.61) per tonne, down 5 yuan compared to last week. They are down 22.9 percent since the beginning of the year.
The devaluation appears to have sparked an increase in exports, which reached 530,000 tonnes over the month, up 29.3 percent compared to July but still a small fraction of China's overall coal trade.
Total exports for the first eight months hit 3.29 million tonnes, down 16.3 percent from the same period last year. ($1 = 6.3670 Chinese yuan)