The European Parliament approved on Thursday a law granting Britons the right to travel to the European Union without a visa after Brexit.

Britons will be able to stay in the EU visa-free for up to 90 days in any 180-day period. The text specifically states that the post-Brexit visa waiver will only be granted if the UK implements a similar measure for EU citizens.

Controversially, the law describes Gibraltar as a British "colony," which the UK branded as "completely inappropriate" in a statement to Euronews on Wednesday.

Read more: EU draft law says Gibraltar is a British 'colony'

The measure was approved with 502 votes for, 81 against and 29 abstentions. It now has to be adopted by the Council of Ministries and must be published in the Official Journal of the EU before April 12 in order to be effective should the UK leave the bloc without a deal on that date.

It reached parliament after being approved on Wednesday with 38 votes for and 8 against by the committee for Civil Liberties, Justice, and Home Affairs (LIBE) after weeks of stalled negotiations and after the removal on Monday of British MEP Claude Moraes as the rapporteur.

Moraes had opposed the addition of a footnote describing Gibraltar as a British "colony". The motion was backed after he was replaced as rapporteur by Bulgarian MEP Sergei Stanislav in what Moraes blasted as "a misuse of our legislative duties."

Prior to the vote, MEPs had rejected attempts to postpone the vote, hold a full debate on the text or add amendments.

In a statement, Stanislav said on Thursday that the law is "an important step for guaranteeing visa-free travel between EU and UK after Brexit, especially in case of a no deal."

"It is no secret that the negotiations were blocked over Council's persistence on the Gibraltar footnote, a matter unrelated to the essence of the report. This irresponsible approach seriously undermines the spirit of since cooperation between EU institutions," he added.

Sign up to our regular newsletter for WhatsApp or Facebook Messenger