WASHINGTON (AP) — The U.S. trade deficit fell in September to the lowest level in five months as imports dropped more sharply than exports and America ran a rare surplus in petroleum.

The Commerce Department said Tuesday that the September gap between what America buys from abroad and what it sells shrank by 4.7% to $52.5 billion. That was down from the August deficit of $55 billion and was the smallest imbalance since April.

The politically sensitive deficit with China edged down 0.6% to $31.6 billion.

President Donald Trump has imposed tariffs on more than $360 billion in Chinese imports. China has retaliated with its own tariffs on American products as the world's two largest economies have engaged in a trade war that has rattled global financial markets and slowed economic growth.

The September deficit reflected the fact that exports fell 0.9% to $206 billion but imports fell an even faster 1.7% to $258.4 billion. For the first nine months of this year, the U.S. deficit is running 5.4% below the same period a year ago. The deficit for all of 2018 totaled $627.7 billion.

So far this year, the deficit with China is 12.8% lower than the same period a year ago although it remains the largest imbalance America runs with any country.

The two countries are currently trying to complete a phase one trade deal that would address some of the administration's complaints that China is stealing U.S. technology and pursuing other unfair trade practices.

Investors are hoping that a phase one agreement will halt the imposition of any further tariffs. Those tariffs have disrupted global supply chains and caused businesses to pull back on their investment spending, resulting in slower economic growth in the U.S. and other countries.

The September trade report showed that the U.S. ran the first surplus in petroleum in more than four decades, according to government records that go back to 1978.

The small $252 million surplus reflected the fact that the United States exported $15 billion in petroleum products in September while importing $14.7 billion. U.S. petroleum exports have been growing in recent years, reflecting a boom in new production methods such as fracking.

In addition to sparring with China, Trump has imposed import taxes on foreign steel and aluminum and is threatening to tax imported autos, too. Trump views America's persistent trade deficits as a sign of economic weakness and the result of unfair trade agreements which he says have resulted in the loss of millions of American manufacturing jobs.

But mainstream economists say the trade gap is the product of economic forces that don't respond much to changes in trade policy such as a strong dollar, which makes U.S. goods more expensive on overseas markets, and the fact that Americans consume more than they produce with imports filling the gap.

In September, the United States recorded a $71.7 billion deficit in the trade of goods such as cars and appliances. But it ran a $19.3 billion surplus in the trade of services such as banking and education.

More From KGAB