The European Union approved legislation to enact its trade deal with the United States on Tuesday, more than two weeks before President Donald Trump would have imposed higher tariffs on the 27-nation bloc if the pact hadn’t taken effect.European lawmakers had until July Fourth, the day of America’s 250th birthday, to finalize their side of the trade deal. Otherwise, Trump would have levied 25% tariffs on EU car imports.The U.S.-EU framework agreement was reached last July when Trump met European Commission President Ursula von der Leyen in Turnberry, Scotland.

The deal required the EU to eliminate tariffs on U.S. imports entirely. In exchange, the U.S. lowered its tariff rate on the EU to 15%. This would affect most EU goods, particularly European cars and auto parts. The U.S. implemented its half of the agreement last fall.

In May, Trump threatened to hike tariffs to 25% after the EU slow-walked its effectuation of the deal in response to the president’s threat to take control of Greenland. That is when Trump gave the EU until Independence Day to approve the trade agreement.

Most lawmakers in the European Parliament voted in favor of the legislation that removed tariffs on U.S. industrial goods and some agricultural products. After its passage, the legislation is set to be ratified by the EU Council on June 26.