Washington (CNN) The United States and Mexico have struck an anti-dumping agreement on tomatoes that makes US growers happy but might mean higher prices for consumers.

The new agreement, reached last week, sets minimum prices for some types of tomatoes and requires new inspections on imports, moves aimed at keeping low-quality produce from coming north.

Mexican-grown tomatoes were hit with tariffs in May after a previous trade agreement lapsed amid ongoing negotiations. The US has long complained that Mexican growers were selling their tomatoes for less than the cost of producing them and undercutting American farmers.

The deal is open to public comment for 30 days before going into effect on September 19.

"This draft agreement meets the needs of both sides and avoids the need for antidumping duties," Secretary of Commerce Wilbur Ross said in a statement.

Read More