She survived an audacious 1984 assassination attempt by the Irish Republican Army that nearly succeeded. The IRA detonated a bomb in her hotel in Brighton during a party conference, killing and injuring senior government figures, but leaving the prime minister and her husband unharmed.
Thatcher won a third term in another landslide in 1987, but may have become overconfident.
She trampled over cautionary advice from her own ministers in 1989 and 1990 by imposing a hugely controversial ‘‘community charge’’ tax that was quickly dubbed a ‘‘poll tax’’ by opponents. It was designed to move Britain away from a property tax and instead imposed a flat rate tax on every adult except for retirees and people who were registered unemployed.
That decision may have been a sign that hubris was undermining Thatcher’s political acumen. Tens of thousands of protesters took to the streets in London and other cities, leading to some of the worst riots in the British capital in more than a century.
The shocking sight of Trafalgar Square turned into a smoldering battleground on March 31, 1990, helped convince many Conservative figures that Thatcher had stayed too long.
‘‘How could a leader who was wise make 13 million people pay a tax they had never paid before? It just showed that she was no longer thinking in a rational way,’’ one of her junior ministers, David Mellor, said in a BBC documentary.
For Conservatives in Parliament, it was a question of survival. They feared vengeful voters would turn them out of office at the next election, and for many that fear trumped any gratitude they might have felt for their longtime leader.
Eight months after the riots, Thatcher was gone, struggling to hold back tears as she left Downing Street after being ousted by her own party.
It was a bitter end for Thatcher’s active political career — her family said she felt a keen sense of betrayal even years later.
In 1992, she was appointed in the House of Lords, taking the title Baroness Thatcher of Kesteven.
Thatcher wrote several best-selling memoirs after leaving office and was a frequent speaker on the international circuit before she suffered several small strokes that in 2002 led her to curtail her lucrative public speaking career.
Denis Thatcher died the following year; they had been married more than half a century.
Thatcher’s later years were marred by her son Mark Thatcher’s murky involvement in bankrolling a 2004 coup in Equatorial Guinea. He was fined and received a suspended sentence for his role in the tawdry affair.
She suffered from dementia in her final years, and her public appearances became increasingly rare. British media reported that Thatcher had been staying at the Ritz because her Belgravia home did not have an elevator and she was having difficulty getting around.
She is survived by her two children, Mark Thatcher and Carol Thatcher, and her two grandchildren.
AP writers Cassandra Vinograd, Raphael Satter, Paisley Dodds and Jill Lawless contributed to this report.