As China turns its back on American ethanol in a lingering trade spat, Brazil is considering opening its doors to U.S. biofuel.

Brazilian authorities are debating whether to yield to Washington's request to lift ethanol-import duties as a way of facilitating talks for a bilateral trade deal with the U.S., two people with direct knowledge of the matter said. A broad trade accord would benefit many Brazilian products and may be announced by October.

Officials in Brazil's Economy Ministry are willing to remove ethanol barriers while those from the more protectionist Agriculture Ministry are pushing to renew the current import quotas with zero tariffs, the people said, asking not to be identified because talks are private.

Two years ago, Brazil slapped a 20% tariff on U.S. ethanol shipments that exceed an annual quota of 600 million liters (158 million gallons) after American corn-ethanol imports surged, flooding the Brazilian market and pushing down prices.

A biofuel deal between the two nations would come as a relief for the U.S. ethanol industry, which has been beset by a supply glut and the weakest margins in more than 15 years. American producers had expanded rapidly to cater to fast-growing Chinese demand, only to be left without buyers amid President Donald Trump's trade war with Beijing.

A decision would have to be made by the end of this month, when the quota expires and a 20% duty on all imports would go back into effect, the people said. Brazil's sugar-cane industry group Unica and the Economy and Agriculture ministries didn't immediately respond to requests for comment.

The administration of President Jair Bolsonaro would at least exclude some American ethanol shipments from the 20% tax in order to preserve relations given Brazil is striving to address other U.S. trade complaints, according to the people. In March, Brazil agreed to open a wheat import quota of 750,000 tons a year free of duty, a move U.S. Wheat Associates says could benefit American farmers.

In a worst-case scenario, the Economy Ministry would extend the 600 million-liter quota to gain more time to negotiate, the people said.

Brazil was the top destination for U.S. corn-ethanol shipments last year, with imports of more than 1.7 billion liters.

This is article was written by Rachel Gamarski and Fabiana Batista, reporters for Bloomberg.