BEIJING (AP) — China’s exports grew last month but at a slower pace than in recent months, the country’s customs agency said.

Exports reached $321.8 billion in August, a 4.4 percent increase compared to the same month last year. That was down from a 7.2 percent jump in July. Imports, meanwhile, totaled $219.5 billion, a 1.8 percent rise.

China’s large trade surplus has become a contentious issue with major trading partners, including the United States and the European Union. Low-priced Chinese imports are a boon for consumers but can lead to job cuts in manufacturing.

In the first eight months of the year, China’s exported $785.3 billion more in goods than it imported from other countries, the monthly customs data showed.

President Donald Trump has imposed 30 percent in additional tariffs on imports from China since taking office early this year. He backed down from even higher tariffs after China retaliated with import taxes of its own. The two countries are in talks to try to reach a trade agreement.

The tariffs from both sides and the possibility they could be raised again are having an impact on two-way trade. Chinese exports to the United States declined 33 percent in August to $47.3 billion, while its imports from the United States dropped 16 percent to $13.4 billion.

Overall, China’s exports grew at the slowest pace since the January-February period, when they rose just 2.3 percent. The first two months of the year are reported together to smooth out distortions from the long Lunar New Year break.

China’s exports of rare earths rose on a monthly basis to $55 million in August, up from $41 million in July, but down 25.6 percent compared to the same month last year.

Rare earth magnets, which can withstand high heat, are vital to many products, including washing machines, cars and fighter jets.