WASHINGTON/NEW YORK (Reuters) - The United States and Mexico on Wednesday finalized terms of a sugar trade pact that seeks to resolve a years-long dispute between the governments before a North American trade deal is renegotiated.

Workers sit next to bags containing sugar at the San Francisco Ameca sugar factory in the town of Ameca, Jalisco, February 18, 2011. REUTERS/Alejandro Acosta/Files

The sugar deal, which was reworked from a 2014 pact, averts imposition of large duties on U.S. imports of Mexican sugar while also addressing U.S. industry demands for protection from cheap, subsidized sugar from its top foreign supplier.

The agreement was initialed by the two governments on Wednesday and opened for public comments for seven days, the U.S. Commerce Department said in a statement.

The news comes a week after U.S. Commerce Secretary Wilbur Ross and Mexican Economy Minister Ildefonso Guajardo announced an agreement in principle.

“Taken together, these amendments provide a significant improvement and are designed to address the concerns raised by the U.S. sugar industry with the operation of the suspension agreements,” the department said in an emailed statement.

The agreement’s key terms were little-changed from the deal last week, though they appeared to address U.S. producer concerns and called for the U.S. Department of Agriculture to first determine what kind of sugar the market needed for any additional imports, according to documents published online.

A spokesman for the American Sugar Alliance said in an emailed statement the group was reviewing the terms of the deal.

The agreement reduces the risk of retaliation from Mexico just as the two countries and Canada ready to renegotiate the North American Free Trade Agreement this year.

The U.S. government was expected to move ahead with the deal even without the support of U.S. sugar producers.

The two countries have been embroiled in a sugar trade war since U.S. farmers and a cane refiner petitioned the U.S. government in 2014 to protect them from dumping of sugar from Mexico. The group said the previous agreement, which set prices and quotas for imports, had not removed harm to the U.S. industry.

Mexico said on Wednesday that Agricultural Minister Jose Calzada will travel to the United States next week to meet with U.S. and Canadian counterparts to begin preparatory talks ahead of the NAFTA negotiation, which is expected to begin in August.