Britain's Prime Minister Theresa May talks with Spain's Prime Minister Pedro Sanchez as they attend the European Union leaders summit in Brussels, Belgium October 18, 2018. REUTERS/Toby Melville

BRUSSELS (Reuters) - The status of the British overseas territory of Gibraltar, a small isthmus on Spain’s southern coast, after Britain leaves the European Union has been agreed with Britain, Spain’s prime minister said on Thursday.

Gibraltar will leave the EU along with the United Kingdom on March 29 next year. Its status, and that of two British sovereign areas in EU member Cyprus, forms part of any overall divorce agreement with the EU.

The part of the Brexit negotiations related to the status of Gibraltar had now been agreed with Britain, Pedro Sanchez said at a news conference on the sidelines of an EU summit in Brussels, without giving any further details.

“Gibraltar will no longer be a problem in arriving at a Brexit deal,” he said.

However, Spain and Britain are still holding separate bilateral talks regarding Gibraltar, focusing on matters such as environmental issues, tax affairs and tobacco trade, Sanchez said.

Britain had displayed a positive attitude towards these negotiations, he added, although the two countries had yet to sign off on any agreement.

“If we reach an agreement (soon), great. If not, it doesn’t matter because we’ve got time to reach one,” he said.

(Refiles to add PM’s dropped first name in paragraph 3.)