There was a passage from T.S. Eliot, a section of Gabriel Faure's "Requiem" and the patriotic hymn "I Vow to Thee, My Country."
The late leader's 19-year-old granddaughter Amanda Thatcher read a passage from Ephesians: "Stand therefore, having your loins girt about with truth, and having on the breastplate of righteousness."
It was a classic Thatcher image, capturing what people loved and loathed about a leader full of strength and certainty.
Afterward, the crowd gathered outside cheered and applauded as Thatcher's coffin was carried out to the half-muffled peal of the cathedral bells. The former prime minister will be cremated, in keeping with her wishes.
The woman nicknamed the Iron Lady brought major change to Britain during her 11-year tenure from 1979 to 1990, privatizing state industries, deregulating the economy, and causing upheaval whose impact is still felt. She died April 8 at age 87.
Thatcher was given a ceremonial funeral with military honors — not officially a state funeral, which requires a vote in Parliament — but proceedings that featured the same level of pomp and honor afforded Princess Diana in 1997, and Queen Mother Elizabeth in 2002.
That raised the ire of some Britons who believe her legacy is a socially and economically unequal nation.
"She divided the country," said Glynn Jones, a taxi driver from Liverpool, a city devastated in Thatcher's time by industrial decline. He said he had come to smoke a cigar, watch the procession go by and "double-check that she is dead and it is not a con."
Protests were held in northern England's former mining towns devastated by the closure of Britain's coal pits after a bitter strike while Thatcher was prime minister.
In the town of Goldthorpe, an effigy of the late prime minister was strung up outside the Union Jack social club, and a replica coffin — adorned with a floral wreath spelling "scab," or strikebreaker — was burned on a pyre.