Rows of officers in dress uniform, many displaying service medals, lined up on nearby streets as on-duty colleagues stood guard during the massive security operation.
Around 50 members of PC Palmer’s family including his wife, child, mother and father, brother and sisters, were among mourners at the service.
Scotland Yard’s first female chief in its 188-year history, Met commissioner Cressida Dick, was also there in her first public engagement in her new role.
Ms Dick read the WH Auden poem Funeral Blues, which begins “Stop all the clocks, cut off the telephone”, and asks for “the traffic police men to wear black cotton gloves” in mourning of a loved one.
In reference to the poem, the Met’s senior chaplain, the Reverend Prebendary Jonathan Osborne, said: “Keith died doing his duty, and it was as if in those moments the clock stopped.”
He said PC Palmer had “laid down his life for each one of us” when he intercepted Masood during the attack.
Officers bowed their heads as the Last Post sounded from the cathedral.
Members of the public outside were able to watch proceedings on screens outside.
The service was followed by a private cremation.