foreign minister@ (Corrects paragraphs 10 and 12 to make clear Spain wants joint use, not ownership, of Gibraltar airport)
* Gibraltar due to leave EU along with UK next March
* Spain says won't use Brexit to try to reclaim Gibraltar
* UK, Spanish diplomats working on bilateral deal on Gibraltar
* Failure to reach deal could disrupt UK's transition plan
MADRID, April 4 (Reuters) - Spain hopes to sign off on a bilateral agreement with Britain over Gibraltar before October so as not to hinder a Brexit transition deal, Spanish Foreign Minister Alfonso Dastis told Reuters on Wednesday.
Failure to reach an agreement on Gibraltar, a British territory on Spain's southern coast, could disrupt a planned 21-month transition period for Britain following its official withdrawal from the European Union on March 29, 2019.
Gibraltar is due to leave along with the United Kingdom on that date, though 96 percent of its population voted in the 2016 referendum to remain in the EU and the territory is anxious to preserve free movement of people across its border with Spain.
Talks between London and Madrid have been underway since January, Dastis said, with teams of Spanish and British civil servants meeting three or four times so far in encounters arranged in both countries.
"Things are progressing well so therefore we'd like to be optimistic," Dastis said in an interview.
Both the EU and Britain have said they hope to get the exit deal agreed by October.
Dastis said he hoped the bilateral accord on Gibraltar could be signed off before October and form a part of that final deal, which is also expected to comprise a framework for future trade relations between the EU and the United Kingdom.
"Our aspiration is that the bilateral agreement (with Spain) can be signed off the same time as the general agreement," he said.
The EU has said the transition deal can only be finalized if Britain honors its commitments on Gibraltar and on the Irish border, another thorny diplomatic issue for London.
AIRPORT, TAX DATA
Talks are centring around possible joint use of Gibraltar airport and a more comprehensive sharing of fiscal data between Britain and Spain for Gibraltar residents to prevent tax avoidance, Dastis said.
The airport is built on a disputed isthmus of land that connects Gibraltar to Spain and that Madrid does not recognize as British territory. It handles around half a million passengers per year with regular flights to British cities.
Spain has sought joint use for the airport on two previous occasions.
"It seems to us a good idea to make a third attempt. You could apply the saying 'third time lucky'," he said.
The peninsula, a British territory since 1713 and known to its 30,000 residents as "the Rock," is a major point of contention in Anglo-Spanish relations. Spain has long claimed sovereignty over the territory.
Shortly after the 2016 Brexit referendum, Spain's then-foreign minister Jose Manuel Garcia-Margallo ruffled British feathers by saying he hoped Britain's exit from the EU would usher in co-sovereignty of Gibraltar - or as he put it at the time, "the Spanish flag on the Rock."
Spain still wants to reclaim Gibraltar, but the government is not trying to use Brexit to further that goal, Dastis said.
"We recognize that Gibraltar was ceded to Britain more than 300 years ago but our aim is to recover it," he said.
"However, we do not want to convert the conversation between the European Union and Britain into a hostage-type situation." (Reporting By Sonya Dowsett Editing by Julien Toyer and Gareth Jones)