Their relationship was often described as businesslike, rather than friendly, but the Queen paid Baroness Thatcher the ultimate compliment by breaking with protocol to attend her funeral.
The Queen, together with the Duke of Edinburgh, attended a prime minister's funeral for only the second time in her 61-year reign, having been among the mourners at Sir Winston Churchill's funeral in 1965.
Sir Winston, however, was given a state funeral, requiring the presence of the monarch. This time, the Queen's decision to attend was an entirely personal choice, and one which Lady Thatcher's family said would have left her "humbled".
Buckingham Palace said the Queen's decision to honour the longest-serving premier of her reign was as a result of the "unique" nature of the occasion. The Queen, dressed in a black coat and hat with a diamond brooch and pearl necklace, led mourners who included 11 serving prime ministers, among them Israel's Benjamin Netanyahu, Canada's Stephen Harper, Italy's Mario Monti and Kuwait's Sheikh Jaber Mubark Al-Sabah.
Lady Thatcher's contemporaries who attended included FW de Klerk, the former South African president, and the former Polish president Lech Walesa.
There were notable exceptions. President Barack Obama declined to attend, while the former Soviet leader Mikhail Gorbachev and Ronald Reagan's widow Nancy were unable to make the journey due to ill health. Instead, the US was represented by the Thatcher-era secretary of state Henry Kissinger and the former vice president Dick Cheney.
John Major, Tony Blair and Gordon Brown sat next to David and Samantha Cameron, with the Labour leader Ed Miliband, the Deputy Prime Minister Nick Clegg and Scottish First Minister Alex Salmond also in the congregation.