The European Union has agreed in principle that British citizens visiting the EU for short periods after Brexit will not need a visa.

The three-month visa waiver would apply whether or not there is a Brexit deal.

However it would be conditional on the UK granting the same rights to EU citizens in return.

The legislation containing the offer had been delayed over its description of Gibraltar as a "colony".

The European Parliament approved the law on Thursday, meaning it will come into effect once EU states have given it the final sign-off.

The final draft includes the description of Gibraltar as a "colony of the British Crown" in a footnote.

It was backed by a parliamentary committee on Wednesday, after the British MEP piloting its passage through the assembly was replaced.

Labour's Claude Moraes had criticised the description, calling it "opportunistic" and "unnecessary".

He said he had been looking for a compromise over replacing the description but had been forced out of the role after "bullying" from EU states.

His replacement, Bulgarian MEP Sergei Stanishev, also criticised EU states' insistence on the term, which he described as "irresponsible".

But he said the European Parliament also wanted to avoid the need to re-introduce visas, which he said would cause "chaos" for British and EU citizens.

The new legislation would come into effect immediately following a no-deal Brexit, or after the planned transition period if there is a deal.

It would allow trips to the EU and four countries in the passport-free Schengen area for up to three months within any six-month period.

It would mean the UK would join a list of around 60 countries whose nationals do not require a visa for short stays in the EU.

However Britons will still need to pay €7 (£6.30) every three years to travel to EU countries, because of a new security system for Schengen zone countries.

The EU had planned to introduce the European Travel Information and Authorisation System (ETIAS) before the UK decided to leave the EU.

The row over the description of Gibraltar flared up earlier this year, when the UK's ambassador to the EU objected to its inclusion in a draft.

At the time a UK government spokesperson said: "Gibraltar is not a colony and it is completely inappropriate to describe it in this way.

"Gibraltar is a full part of the UK family and has a mature and modern constitutional relationship with the UK."

Gibraltar was ceded to Great Britain in the 1713 Treaty of Utrecht, but Spain has continued to press its claim for sovereignty - which is rejected by both the UK and the residents of Gibraltar itself.

In December, the United Nations called on Spain and Britain to find a "definitive solution" to their long-running dispute.