The UK will reach a deal with Spain on the status of Gibraltar after Brexit, Pedro Sánchez, the Spanish Prime Minister, has announced.

Speaking after the European Council summit in Brussels Thursday, he said that significant progress had been made on the issue, while other leaders said the issue of the Irish border has remained problematic.

A protocol on the British overseas territory, which borders Spain, for governing citizens’ rights and issues such as security “is already closed with the British government”, he said.

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

Spanish and British authorities are also working on bilateral arrangements on issues affecting the province including tax and tobacco smuggling, he said.

In March 2016, shortly after the Brexit vote, the European Union (EU) indicated Gibraltar would be a major obstacle for the UK leaving the bloc and handed Spain a “veto” over future arrangements.

Anti-Brexit politicians claimed it was evidence that leaving the bloc was difficult and damaging, but some on the pro-Brexit side said it was being deliberately aggravated, like the Irish border issue, to frustrate Brexit.

Gibraltar to fly the Commonwealth flag. https://t.co/rwn9z6LTFq — Breitbart London (@BreitbartLondon) May 22, 2017

Mr Sánchez said: “The Gibraltar protocol is resolved, it’s been closed with the British government, and what we are doing now is working out the four memorandums for the bilateral relationship between the government of Spain and the UK.”

“That bilateral relation contains elements such as taxes, environmental cooperation, security, and the movement of workers between Gibraltar and the Campo de Gibraltar.

“These issues are still pending, but in the talks I had this morning with Prime Minister Theresa May, we encouraged one another to reach an agreement on two out of the four memorandums, those dealing with tax issues, which are the most flexible ones,” he added.

Meanwhile, EU leaders and the Prime Minister failed to reach an agreement on the Irish border, with both sides now proposing delaying the UK’s exit from the Customs Union even further so a solution can be found.