Margaret Thatcher, the recently deceased ex-prime minister of the United Kingdom, was a close friend and great admirer of another female head of government with whom she shared many qualities: Indira Gandhi of India.

Like the conservative Thatcher, the leftist Gandhi was the first (and thus far, only) female prime minister of her country and inspired equal amounts of adoration and scorn from the public.

Thatcher knew Gandhi well from the time she was the leader of opposition in the 1970s through her early years as British prime minister, until the Indian leader was assassinated in 1984.

"Very early on, we struck up a close rapport, for we both felt the loneliness of high office and it was good to be able to talk to someone who understood," Thatcher said during a visit to India in 1995, although she admitted that the two had dramatically different political ideologies.

"Mrs. Gandhi and I had very different ideas about politics. But I found in her qualities which seem to me essential in a statesman. She was passionately proud of her own country, always courageous and very practical.”

Thatcher also referred to Gandhi in her 2012 memoir, "The Path To Power," when, as leader of the opposition, she visited India in late 1976 during the peak of the post-emergency crisis.

"In spite of everything I found myself liking Mrs. Gandhi herself,” Thatcher wrote.

“Perhaps, I naturally sympathized with a woman politician faced with the huge strains and difficulties of governing a country as vast as India. … She had taken a wrong [turn] and was to discover the fact at her party's devastating election defeat in 1977.”

Thatcher also seemed to connect with Gandhi on a more personal level.

"I lunched with Indira Gandhi in her own modest home, where she insisted on seeing that her guests were all looked after, and clearing away the plates while discussing matters of high politics," she said in archived documents related to the 1976 visit.

In 1982, three years into her first term as prime minister, when Britain hosted the Festival of India, Thatcher personally welcomed Gandhi to London and described her as a "distinguished leader of a great country" and the "prime minister of the world's largest democracy.”

The two women also shared something else -- they were both targeted by terrorists and assassins in the same year. In late October 1984, Gandhi was assassinated by her Sikh bodyguards. Less than one month previously, Thatcher survived a bomb attack by the Irish Republican Army at a Conservative Party conference in Brighton, England.

Following the Brighton incident, which killed five people, Gandhi was one of the first foreign officials to extend her condolences to Thatcher.

A few weeks later, Gandhi herself was killed in New Delhi.

“The unthinkable had happened,” Thatcher said of her Indian counterpart’s assassination. "Gandhi's death by terrorism is forever linked in my mind with my own survival of it."

Following the murder, Thatcher journeyed to New Delhi to lay a wreath on Gandhi’s body at the Teen Murti Bhavan.

"I will miss Mrs. Indira Gandhi very much indeed," she told reporters at the time. “She was a truly great leader."

Thatcher also made an obvious reference to the Sikhs who had killed Gandhi and those who celebrated her death, both in India and in Britain.

"I learn that there is a great indignation and distress -- rightly in my view -- among the government and the people of India about the outrageous behavior of a tiny minority of irresponsible people in Britain who have gloated over Mrs. Indira Gandhi's murder and the publicity they have received," she told reporters.

Seven years later, when Indira’s son Rajiv fell to an assassin’s suicide bomb, Thatcher said he was outraged and "personally bereaved and angry that it should have happened.”

Thatcher, who died of a stroke on Monday at the age of 87, will be buried at London's St. Paul's Cathedral on April 17 with full military honors and Queen Elizabeth in attendance.