LONDON (Reuters) - Within hours of Britons voting to leave the European Union, politicians in Scotland, Ireland and Spain raced on Friday to argue that the historic move bolstered claims over long-disputed parts of British territory.

In a referendum outcome that triggered Prime Minister David Cameron's resignation and record losses for sterling on foreign exchange markets, British voters chose by 52-48 percent to end the country's 43-year-old membership of the EU.

The move also threatened to strain the fabric of the 215-year-old United Kingdom itself. Scottish and Northern Irish nationalist politicians said it underlined just how different they were, while a Spanish official said Madrid would seek "co-sovereignty" of Gibraltar on the Spanish coast.

"Scotland has delivered a strong, unequivocal vote to remain in the EU, and I welcome that endorsement of our European status," First Minister and Scottish National Party leader Nicola Sturgeon said of a local Scottish vote that was 62-38 percent in favor of remaining in the 28-nation bloc.

Her predecessor Alex Salmond went further, explicitly saying Scotland was now likely to push for a second independence referendum, after Scots voted to remain in the UK in 2014.

England and Wales voted clearly to leave the EU on Thursday. With 56 percent of Northern Irish voting to stay, deputy government leader Martin McGuinness of the nationalist Sinn Fein party urged London to allow a referendum on whether to unite the two sides of the Irish border.

"The British government now has no democratic mandate to represent the views of the North in any future negotiations with the European Union and I do believe that there is a democratic imperative for a 'border poll' to be held," McGuinness told national Irish broadcaster RTE.

"MASSIVE" IMPLICATIONS

"The implications for all of us on the island of Ireland are absolutely massive. This could have very profound implications for our economy (in Northern Ireland)," he added of the province created by the 1921 partition of Ireland into north and south.

In Madrid, acting Spanish foreign minister Jose Manuel Garcia-Margallo said the vote completely changed the outlook on the future of the peninsula, a British Overseas Territory since 1713 and known to its 30,000 residents as "the Rock".

"I hope the formula of co-sovereignty - to be clear, the Spanish flag on the Rock - is much closer than before," he said.

Such assertions may not, however, see immediate follow-up.

After the 2014 Scottish referendum, Sturgeon herself is wary of pressing independence claims until being sure of having a solid majority for them.

Likewise Northern Ireland's pro-British First Minister and Democratic Unionist Party leader Arlene Foster dismissed the call by her deputy McGuinness, telling Northern Ireland's Radio Ulster there was "no way" a vote would favor a united Ireland.

Gibraltar voted in favor of Britain remaining in the EU. A spokesman for Gibraltar's government declined to comment on the overall Brexit vote and referred to previous statements on how co-sovereignty had already been rejected by around 99 percent of Gibraltarians in a previous local referendum.

(Reporting by Angus Berwick in Madrid, Elizabeth O'Leary in Edinburgh and Padraic Halpin in Dublin; Writing by Mark John; Editing by Andrew Roche)