Westminster secretly lobbied the Indian government to give the go-ahead to a controversial multi-billion pound deal with a leading Scottish oil company, internal emails passed to the Sunday Herald reveal.

UK government officials, briefed "over dinner" by Edinburgh-based Cairn Energy, offered to "polish" and send a letter drafted by the company. At a lunch, they also urged a key Indian government minister to back the deal. The Indian government subsequently gave permission for Cairn's £5.5 billion agreement to sell off the bulk of its Indian oil business to Vedanta, an Indian mining and metals giant much criticised by human rights and environmental groups. The deal, labelled "the largest transaction ever to happen in India", is now being challenged in the Indian Supreme Court.

The controversial agreement with Vedanta was at the root of the shareholder rebellion that swept through Cairn's AGM in Edinburgh on Thursday. Plans to reward the company's founder and chairman, Sir Bill Gammell, bonuses for securing the deal were voted down two-to-one by shareholders.

In anticipation of the revolt, Cairn had already withdrawn a proposed £3.5 million payment, but a further £1.4m remained. As the vote was only advisory, it is unclear whether Gammell will still get the money.

Gammell, a former Scottish rugby international, is a close friend of former British Prime Minister, Tony Blair, and former US President George W Bush. His company rocketed into the world's super-wealthy league in 2004 when an oil field it had bought in the Indian province of Rajasthan was found to contain a billion barrels of oil. Cairn has been trying to sell a majority stake in its Indian oil business to Vedanta for two years. But the deal ran into fierce opposition in India because of concerns about Vedanta's environmental and human rights record.

Amnesty International has campaigned against Vedanta, and the Church of England, along with other investors, have sold their shares in protest. Over the last two years, 93 company workers or contractors have died in accidents.

To try and save the sell-off, Cairn discretely lobbied the UK government, which in turn lobbied the Indian government. In an email on October 21 2010, an official at the government's UK Trade and Investment (UKTI) agency recounted how an executive from Cairn had "briefed me over dinner on the problems with their sale to Vedanta".

He said: "Cairn basically want the Indian system gently nudged to unstick the deal - It would be rather easy to feed in a company originated draft that we cd [could] polish."

In another email on October 8 2010, a senior UKTI official, Edward Oakden, reported on a lunch with Gammell, the then Indian oil minister Murli Deora, regulators and businessmen. "I spoke privately to the Minister about the prospects for the Cairn/Vedanta deal," he said.

"I said that while I understood that the issue was sensitive in India, providing India's normal regulatory requirements were respected, the deal should be allowed to proceed. The Minister agreed: he thought that it would go through." Oakden added: "The Indian energy regulator, who also attended, said the same to me. I later passed this on to Bill Gammell and the CEO of Cairn India."

David Cameron who once famously described lobbying "as the next big scandal waiting to happen", was also reported to have written to his Indian counterpart, Manmohan Singh, backing the deal in February 2011. It was finally given the go-ahead in December 2011, though it is now under investigation in the Indian Supreme Court.

The emails were obtained under Freedom of Information law by PR monitoring group, Spinwatch. It accused government officials of "bending over backwards" to help Cairn despite opposition in India.

The government's UKTI argued its job was to help UK businesses achieve success internationally. "We wanted to impress on the Indian Government the need for British companies as a whole to be able to operate freely under the law, according to their commercial judgment, provided that the necessary regulatory requirements had been met," said a UKTI spokesman.

According to Cairn Energy, the lunch with Gammell and Deora was an open, industry-wide event. It was common practice for global businesses to have discussions with governments, the company pointed out. "Cairn has always had regular and open dialogue with the British High Commission in more than 20 years of operating in South Asia," said a company spokeswoman.

"They have always been very supportive of British interests in the subcontinent."

Vedanta did not respond to repeated requests for comments.

l Business focus: page 38