David Cameron has asked the cabinet secretary, Sir Jeremy Heywood, to conduct an urgent investigation into an apparent decision by the government of Margaret Thatcher to send an SAS officer to Delhi in 1984 to advise the Indian government on the expulsion of militants from the Golden Temple in Amritsar.

Amid calls from Sikh groups for an inquiry into the alleged British involvement in planning the operation, Downing Street said the investigation would examine two issues: the British action in 1984 and the decision to release such sensitive government papers.

Heywood will want to examine why the papers were not marked sensitive and held back when papers from 1984 were released under the annual 30-year rule.

The prime minister intervened after the recent, explosive release of papers from 1984, which showed that the then foreign secretary, Sir Geoffrey Howe, responded "favourably" to a request from Delhi for help in drawing up plans to launch a military operation to remove militants from the Golden Temple in Amritsar, the holiest site in the Sikh faith.

The Indian government said around 400 people were killed when the Indian prime minister, Indira Gandhi, sent troops into the temple in June 1984 in the six-day Operation Blue Star. Sikh groups, which have called for an inquiry into the British role in "one of the darkest episodes in Sikh history", put the death toll in the thousands, including many pilgrims.

The revelation of British involvement prompted an intense debate in India. The general who led the assault on the temple, Lieutenant General KS Brar, said that the allegation the British government secretly helped the late Indian prime minister Indira Gandhi to plan the mission was "fictitious" and that "all the plans [for Operation Blue Star] were laid and executed by Indian military commanders".

Brar told the Guardian: "There was no question of getting help from the British government and no suggestion or mention at any stage of a British officer who had come and advised. It was a last-minute operation because the prime minister was negotiating with the Sikh leaders to arrive at an amicable solution. As a last resort, she ordered the operation."

A leading member of the opposition BJP party, which is favourite to win this year's Indian general election, said the documents raised questions about claims by Indira Gandhi's government that it only decided to launch the operation to storm after talks with Sikh politicians broke down in May 1984.

The British documents show that India sought UK advice in February 1984 and that Britain was confident a military operation would be launched.

Arun Jaitley, the BJP leader in the upper house of the Indian parliament, blogged: "Contrary to what we have been told that it was the collapse of the dialogue in May, 1984 that led to the 'Operation Blue Star', the government of India was in dialogue with the British government on the plan to remove the dissident Sikhs from the holy Golden Temple...If [the] British government was being consulted in February 1984, it only lends credence to the fact that government of India neither believed in nipping the problem at the initial stage nor in exploring alternative methods of evacuating the extremists from the Golden Temple. It wanted to invade the sacred precincts of the Golden Temple no matter even if it hurt the national interest and certainly the interests of the Sikhs."

Cameron's spokesman said Heywood would conduct his inquiry as quickly as possible. "The cabinet secretary has been asked by the prime minister to look into what may have happened in 1984 with regard to papers that have been recently released. The prime minister has asked the cabinet secretary to lead an investigation on that subject. The important thing is to establish all the facts as quickly as possible. That work is under way."

The spokesman added: "The reason behind it [the investigation] is that issues have been raised around the decisions both to release papers and also to consider the facts contained within the papers. So there are two aspects to it."

Cameron reached out to Sikhs when he visited the Golden Temple last year and the nearby Jallianwala Bagh, where he wrote of the "deeply shameful" Amritsar massacre of 1919, when at least 379 innocent Indians died after British troops opened fire.

David Cameron visiting the Golden Temple at Amritsar last year. Photograph: Stefan Rousseau/PA

No 10 acted after Phil Miller, an independent journalist, disclosed the letters after visiting the National Archive at Kew seeking information on SAS involvement in Sri Lanka. The correspondence was published on Monday on the Stop Deportations website. A letter dated 23 February 1984, from Howe's private secretary, Brian Fall, to Hugh Taylor, his counterpart serving the home secretary at the time, Leon Brittan, said the foreign secretary had decided to respond "favourably" to an Indian request for British advice on an operation to remove Sikh extremists from the Golden Temple. Fall wrote: "With the prime minister's agreement, an SAD officer has visited India and drawn up a plan which has been approved by Mrs Gandhi. The foreign secretary believes that the Indian government may put the plan into operation shortly." The reference to SAD is understood to be a typographical error for SAS, which is referred to later in the letter.

Fall wrote that Britain's involvement in advising the Indian authorities should be kept secret to avoid inflaming tensions within the Indian community in Britain. He wrote: "We have impressed upon the Indians the need for security; and knowledge of the SAS officer's visit and of his plan has been tightly held in India and in London. The foreign secretary would be grateful if the contents of this letter could be very strictly limited to those who need to consider the possible domestic implications."

In an earlier letter, dated 6 February, Thatcher's private secretary, Robin Butler, said Thatcher had given her approval to the plan. Butler, who later became cabinet secretary, wrote: "The prime minister is content that the foreign secretary should proceed as he proposes."

The decision is likely to inflict severe damage on the government's relations with the Sikh community. Cameron reached out to Sikhs when he visited the Golden Temple last year and the nearby Jallianwala Bagh, where he wrote of the "deeply shameful" Amritsar massacre of 1919 when at least 379 innocent Indians died after British troops opened fire.

Paul Uppal, Britain's only Sikh MP who accompanied Cameron on his trip to the Golden Temple and who spoke to officials in No 10 on Monday night, praised the prime minister for acting quickly. Uppal, the Conservative MP for Wolverhampton South West, said: "It is important that we address what went on, what advice was given and whether this differed from the final strategy of the Indian government. There is a bit of a gap from February to June.

"British Sikhs want to get to the nub of exactly what went on. These documents coming to light have resurrected a lot of those old wounds. For me personally it brought back a lot of those memories as a 16 year old watching those scenes unfold on television with my family. This is a very sensitive issue for many Sikhs. It was a seminal moment."

The head of the Sikh Council UK, Gurmel Singh, said he was "shocked and disappointed" at the idea that the government of Margaret Thatcher may have been involved. The Labour MP Tom Watson, whose West Bromwich constituency is home to many Sikhs, has demanded that the Foreign Office release further papers about any British role.