The European Union and many of China's other trading partners have debated whether to treat China as a "market economy", which Beijing says was its right at the end of 2016, some 15 years after it joined the World Trade Organization.
The EU kicked off discussions early in 2016 and held public consultations, gathering over 5,000 opinions on how to handle trade complaints against China.
The European Commission, member states and EU lawmakers finally overcame their differences on Tuesday after a number of failed attempts, representatives of all three told a news conference.
In determining whether to impose import tariffs, the EU will now treat all WTO members the same. Their businesses will only be dumping if their export prices are below domestic prices.
But the EU will make exceptions for cases of "significant market distortions", such as excessive state intervention, an exception expected to cover many Chinese firms.
Until now, China has been treated as a special "non-market" case, meaning EU investigators decide that its exports are artificially cheap if the prices are below those of a third country, such as the United States.
China last year launched a complaint at the WTO against Europe and the United States over their trade defence practices.
The European Commission, supported by the EU's 28 member states, believed the rules for China needed to be changed. That meant finding a balance between adhering to WTO rules and protecting EU companies threatened by dumping.
"I am convinced we have met these two targets," Bernd Lange, head of the EU Parliament's trade committee, said after the deal. He also hailed the new possibility of investigations into social and environmental dumping.
Critics, including many in the European Parliament, said the new rules shifted the burden of proof from Chinese to EU producers, making it much harder to impose measures.
The Commission said that burden would not shift because it will issue reports on countries to determine whether their markets are distorted.
EU Trade Commissioner Cecilia Malmstrom said the Commission had already started work on reports for "some major countries where we suspect distortions" which would hopefully be ready by the time the new laws come into force at the end of the year.
EU steelmakers association Eurofer, which has brought a series of trade complaints against Chinese imports, said the agreement was important, but wanted to see how it worked in practice.
(Reporting by Philip Blenkinsop; Editing by Robin Emmott and Catherine Evans)