The letter, dated June 14, 1984, was made public for the first time on Tuesday as part of a British government inquiry into the role played by the UK in the lead up to the Indian army operation on Golden Temple in Amritsar to remove militants.
"It is never easy to undertake security action involving a place of worship... but this place, so sacred to the people of the Sikh faith, had been converted by terrorists into a base of operations," wrote Gandhi just days after the operation that left more than 1,000 people dead.
Also Read: UK admits 'purely advisory' role in Operation Blue Star
"We did know that arms were being collected there. But only after last week's action did we realise how vast and sophisticated these weapons were... For months a reign of terror was unleashed from the temple complex, holding all Punjab to ransom. We had no choice but to send an army unit which exercised the utmost restraint, using a minimum of force," she added.
The former Indian prime minister also shared her regrets over the fallout of the military action with Thatcher, one of her close political allies.
"Many in the Sikh community have been shaken by this traumatic event. The process of healing and conciliation will take time but we shall persevere," she wrote.
The letter is among five additional documents released with the inquiry report by UK Cabinet Secretary Jeremy Heywood which would not normally have been published.
Among them is a note dated February 23, 1984, that sets out how an eight-day visit by a British military expert had helped draw out a "realistic and workable plan" to root out extremists from the Golden Temple as the Indians were fairly unprepared for action and were applying a "sledgehammer to crack a nut" principle to the whole operation.
British Prime Minister David Cameron had ordered the inquiry after documents released under the 30-year declassification rule here implied British SAS commanders had advised the Indian government as it drew up plans for a military operation on Golden Temple in February 1984.
"We have taken this step because the whole investigation has been based on a commitment to the maximum possible transparency," Britain's foreign secretary William Hague told parliament in London on Tuesday as part of a statement on probe.
"We want to be as open as possible with the British public, in so far as that does not undermine the principle upheld by successive British governments of not revealing any information relating to Intelligence or Special Forces," Hague added in reference to certain names and sentences blanked out in the documents.
Describing the loss of life as part of Operation Bluestar an "utter tragedy", he revealed that the nature of the UK's assistance was "purely advisory, limited and provided to the Indian government at an early stage in their planning".
"It is also consistent with an exchange of letters between Mrs Gandhi and Mrs Thatcher on 14th and 29th June 1984 discussing the operation, which made no reference to any UK assistance," he said.
Labour's Douglas Alexander, the shadow foreign secretary, called on the government to publish the second letter as well as all other related material.
Hague, however, stressed that no further documents will be made public, adding: "The investigation did not find any evidence in the files or from officials of the provision of UK military advice being linked to potential defence or helicopter sales, or to any other policy or commercial issue.
"There is no evidence that the UK, at any level, attempted to use the fact that military advice had been given on request to advance any commercial objective."
The cabinet secretary's inquiry report also points out that the fact that the UK provided some operational advice at the request of the Indian intelligence coordinator had already been put in the public domain in 2007 through a book by Bahukutumbi Raman, a former member of India's Intelligence Research and Analysis Wing.
"The UK government did send one military officer to provide military advice on Indian contingency plans for an operation at Sri Harmandir Sahib. This military advice was a one-off. It was not sustained. There was no other UK military assistance, such as training or equipment, to the Indians with Operation Blue Star," the Heywood report states.
"The UK government did not link the provision of this military advice to defence sales. The decision to help was taken in response to a request for advice from a country with which the UK had -- and has -- a close relationship. The military advice from the UK officer had limited impact in practice.
"The actual operation implemented by the Indian army differed significantly from the approach suggested by the UK military officer," it concludes.
Image: Indira Gandhi and Margaret Thatcher
UK admits 'purely advisory' role in Operation Blue Star
Britain to reveal Thatcher's role in Operation Bluestar
Cong won't back Jan Lokpal bill 'if norms not followed'
Cameron orders urgent probe into Thatcher link to Op Bluestar
Juhi or Shabana? Vote for your fave Lady Politician in Bollywood!