EU lawmakers approved the EU-UK Trade and Cooperation Agreement by 660 votes to five, with 32 abstentions.
The vote cleared the last hurdle towards the full ratification of the agreement, and marks the end of more than four years of negotiations that began after the UK decided to leave the European Union in a referendum in June 2016.
Prime Minister Boris Johnson said: "This week is the final step in a long journey, providing stability to our new relationship with the EU as vital trading partners, close allies and sovereign equals. Now is the time to look forward to the future and to building a more global Britain."
The UK's Brexit Minister Lord Frost said the vote was an "important moment," as it "brings certainty and allows us to focus on the future."
"There will be much for us and the EU to work on together through the new partnership council and we are committed to working to find solutions that work for both of us.
"We will always aim to act in that positive spirit but we will also always stand up for our interests when we must—as a sovereign country in full control of our own destiny."
European Commission President Ursula von der Leyen also welcomed the result, saying the Brexit deal "marks the foundation of a strong and close partnership with the UK."
But she emphasized that "faithful implementation is essential."