Margaret Thatcher lived her life "in the heat of political controversy," but the funeral of the former British prime minister was no time to debate her legacy, Bishop of London Richard Chartres said at the service today before more than 2,000 people, including the Queen and Canadian Prime Minister Stephen Harper.

"After the storm of a life lived in the heat of political controversy, there is a great calm; lying here, she is one of us," the bishop said of the former leader, known as the Iron Lady for her candour, strong will and polarizing actions while in office.

Thatcher, the first and only woman to serve as British prime minister, from 1979 to 1990, died last week at 87 after a stroke. The ceremonial funeral, which occurs only with the Queen's permission, began about 5 a.m. ET and lasted about two hours. The cathedral, which seats about 2,300, was filled to capacity.

During the service, Chartres also gave accounts of Thatcher's ability to reach out to people. One story in particular drew a laugh from the congregation. He said she once warned him at a function: "Don't touch the duck pate, bishop; it's very fattening."

Following the service, a blessing was given by Archbishop of Canterbury Justin Welby, before her flag-draped coffin was led out of the cathedral.

Thatcher's coffin was brought to Westminster on Tuesday. The coffin remained there overnight before being transported on Wednesday morning to the church of St. Clement Danes and then moved to St. Paul's.

The coffin — draped with the Union Jack and topped by white roses and a note from her children reading "beloved mother" — was borne to the cathedral on a gun carriage drawn by six black horses.

Security stepped up

Outside St. Paul's, CBC's Susan Ormiston reported after the coffin left the cathedral that the funeral "went to military precision, with a lot of Armed Forces involved.

inside-thatcher-04252462

Former prime minister Margaret Thatcher, a polarizing figure in British politics but one lauded for her strength and courage, died last week at age 87 following a stroke. (J. Scott Applewhite, file/Associated Press)

"Inside was a sombre and really short service — much like [Thatcher] had requested," with her 19-year-old granddaughter Amanda Thatcher and British Prime Minister David Cameron giving readings. Her remains will be cremated later Wednesday, Ormiston added.

Ormiston noted that "many people have talked about the benefit [of] what she did, many have objected to where she left this country, but she was a world leader," which is why Mulroney, Foreign Affairs Minister John Baird and other Canadian dignitaries attended.

CBC's Margaret Evans earlier reported there has been heated debate about the most appropriate way to bid farewell to the long-serving Tory and controversial figure in British politics.

With the prospect of protests, about 4,000 police officers were deployed on the streets as part of the funeral security, Evans said from London on Tuesday.

British officials stepped up the security plan following Monday's deadly attack near the finish line of the Boston Marathon.

Thatcher was given a ceremonial funeral with military honours — not officially a state funeral, which requires a vote in Parliament — but proceedings that featured the same level of pomp and honour afforded Diana, the Princess of Wales, in 1997 and the Queen Mother Elizabeth in 2002.

inside-thatcher-queen-04297

Carol Thatcher, left, the daughter of former British prime minister Margaret Thatcher, looks on as her brother, Mark Thatcher, second from left, speaks with the Queen and Prince Philip following Thatcher's funeral ceremony at St. Paul's Cathedral in London on Wednesday. (Bogdan Maran/Associated Press)

That has raised the ire of some Britons who believe her legacy is a socially and economically divided nation.

On Wednesday, spectators lining the funeral procession route broke into applause — and scattered boos — as the carriage passed by, escorted by young soldiers, sailors and airmen.

Yet some clearly disagreed with the bishop's exhortation not to protest. Some people staged silent protests by turning their backs upon Thatcher's coffin. One man held a banner declaring "Rest in shame." Arguments also broke out in the crowd along the route between Thatcher supporters and opponents.

After arriving in London, Harper, one of the many foreign leaders attending the funeral,  praised Thatcher and said he thinks the Tory politician was "an inspiration for all women in conservative parties across the world and certainly in our own Conservative Party in Canada."

Many former politicians attend

Former prime minister Brian Mulroney also joined the Canadian delegation. His time as prime minister, from 1984 to 1993, coincided with part of Thatcher's lengthy tenure.

Family, friends and colleagues of Thatcher were invited to the funeral, along with many politicians and foreign dignitaries. Former U.S. secretaries of state Henry Kissinger, George Schultz and James Baker are among the guests associated with Thatcher's time in office.

Nancy Reagan — whose late husband, former president Ronald Reagan, had a close relationship with Thatcher — was not able to attend; nor was former Soviet leader Mikhail Gorbachev, who shared key moments in history with the former prime minister. Germany's Angela Merkel sent her foreign minister, while U.S. power families the Clintons and the Bushes did not make appearances.

The flag over 10 Downing Street would be flown at half-mast from 8 a.m. local time until 8 p.m., officials said.

With files from The Associated Press and The Canadian Press