British Member of the European Parliament Sir Graham Watson, a Liberal Democrat, reportedly told the Gibraltar Broadcasting Corporation: "Indeed I am told that PM (David) Cameron actually said to the Spanish Prime Minister (Mariano Rajoy), 'If you carry on with these border queues we will make sure you don't get the Olympic Games."
Madrid came in a surprising third place behind Istanbul and winners Tokyo despite being tipped as the favourite in the lead-up to the bid last September.
During Madrid's final presentation in Buenos Aires, Spanish Olympic Committee President Alejandro Blanco fielded a set of difficult questions from British IOC delegate Adam Pengilly, according to online sports website Inside the Games.
But a spokesperson for David Cameron’s government has dismissed Watson’s comments, claiming the UK “did not favour any of the three finalists over others, and there was absolutely no UK attempt to influence any of the bids".
Tensions between the UK and Spain flared in July 2013 when Gibraltar boats dumped blocks of concrete in disputed waters used by Spanish fishermen.
Gibraltar said it was creating an artificial reef that would boost fish populations and Spain complained the blocks threaten the livelihoods of Spanish fishermen.
SEE ALSO: Ten things you didn't know about Gibraltar
Spain also blamed Gibraltar for an increase in tobacco smuggling to the Spanish mainland.
Madrid subsequently stepped up border checks, leading to huge queues for motorists, in what Britain and Gibraltar charged were a retaliatory measure aimed at choking the territory's economy.
Spain ceded Gibraltar to Britain in 1713 but has long argued that it should be returned to Spanish sovereignty. London says it will not do so against the wishes of Gibraltarians, who are staunchly pro-British.
Don't miss stories about Spain, join us on Facebook and Twitter.