LONDON — A horse-drawn gun carriage bore the coffin of Margaret Thatcher to St. Paul’s Cathedral on Wednesday for a ceremonial funeral that divided British opinion, much as the former prime minister known as the Iron Lady stirred deep and conflicting emotions during her lifetime and, in death, triggered an equally passionate debate over her legacy.
With hymns, prayers, and biblical readings, dignitaries from around the world and from Britain’s political elite gathered in the cathedral for a service regarded as austere, reflecting Thatcher’s Methodist upbringing, as bells pealed and a gun salute boomed from the Tower of London.
Some 700 military personnel from the army, Royal Navy, and Royal Air Force lined the streets, including guards in scarlet tunics and distinctive black bearskin hats in a closely scripted display of ceremonial precision honed over centuries.
Thousands of people several deep lined the streets as the gun carriage passed by at 70 paces per minute. Some onlookers applauded, drowning out scattered boos; some cheered and recorded the moment. Under gray and drizzly skies that gave way to watery sunshine, well-wishers threw single flowers into the road, while a handful of protesters turned their backs on the procession.
The coffin was draped in the Union flag, crowned by a wreath of white flowers with a handwritten note: ‘‘Beloved mother — always in our hearts.’’
Thatcher was the country’s first female prime minister. Her radical, market-driven policies and determination to crush labor union power made her one of its most divisive leaders. She died of a stroke last week at 87.
There were moments in the funeral service that recalled her reputation for her unwavering belief in her convictions. A biblical passage read by her 19-year-old granddaughter, Amanda Thatcher, proclaimed: ‘‘Stand therefore, having your loins girt about with truth, and having on the breastplate of righteousness.’’
Even the nature of Wednesday’s 55-minute ceremony — a state funeral in all but name — provoked complaints about its cost and appropriateness. The last British politician to be accorded such a parting accolade was Winston Churchill in 1965. But authorities sought to avoid a politicized service.
“After the storm of a life led in the heat of political controversy, there is a great calm,’’ the bishop of London, the Right Rev. Richard Chartres said in an address. ‘‘The storm of conflicting opinions centers on the Mrs. Thatcher who became a symbolic figure — even an ism.’’
But, he continued, ‘‘there is an important place for debating policies and legacy; for assessing the impact of political decisions on the everyday lives of individuals and communities. Parliament held a frank debate last week — but here and today is neither the time nor the place.’’
After the service, a hearse transported Thatcher’s coffin to a hospital in Chelsea before a private cremation later.
There was no immediate sign of large-scale protests by anti-Thatcher demonstrators but police kept watch.
At Ludgate Circus, close to St. Paul’s, a small group of protesters gathered, some with banners reading: ‘‘Now bury Thatcherism.’’ Some jeered and shouted, ‘‘good riddance.’’
Natasha Munoz, a writer from London, said: ‘‘I am protesting against the legacy of a woman who as far as I am concerned destroyed this country. She destroyed our communities and our industrial base, she created a culture of the individual and of greed that disgusts me.’’
Thatcher’s coffin lay overnight in the historic chapel of St. Mary Undercroft in Parliament, where the English Civil War leader Oliver Cromwell was said to have stabled his horses in the 17th century. Some 4,000 police officers were on duty, plus an honor guard of 700 military personnel.
Officials were already concerned about the possibility of disruption by political foes of Thatcher, the longest-serving British prime minister for 150 years. But after Monday’s bombing of the Boston Marathon, police indicated security would be tighter.
As the funeral cortege approached St. Paul’s, Queen Elizabeth II and Prince Philip arrived to attend the ceremony, along with hundreds of foreign dignitaries, including former Secretary of State Henry A. Kissinger. The US delegation named by the White House was led by two more former secretaries of state, George P. Shultz and James A. Baker. But some British Conservatives complained that President Obama did not send a senior serving member of his administration.
The guests also included F. W. de Klerk, the last white president of South Africa, and Israeli Prime Minister Benjamin Netanyahu. Figures from the opposition Labor Party included former Prime Minister Tony Blair and Ed Miliband, the current party leader.
St. Paul’s is associated often with state and royal events, such as the wedding of Prince Charles and Diana in 1981.