Media playback is unsupported on your device Media caption PC Keith Palmer's funeral cortege makes its way from the Palace of Westminster to London's Southwark Cathedral

The funeral of PC Keith Palmer, who was killed in last month's Westminster attack, has taken place at Southwark Cathedral in central London.

Thousands of police officers lined the route of a 2.6-mile funeral cortege starting at the Palace of Westminster.

PC Palmer, 48, who was married with a five-year-old daughter, was guarding the Houses of Parliament on 22 March when he was stabbed by Khalid Masood.

A floral tribute left on top of his hearse read: "No 1 daddy".

The cathedral service, attended by around 50 members of PC Palmer's family including his wife, child, parents, brother and sisters, was followed by a private cremation.

Home Secretary Amber Rudd, Mayor of London Sadiq Khan and the manager and captain of PC Palmer's beloved Charlton FC, Karl Robinson and Johnnie Jackson, were also among the congregation.

PC Palmer was killed as he tried to stop Masood enter the Houses of Parliament. Masood, who had already driven into people on Westminster Bridge, was shot dead by police.

Officers from all over the country travelled to London to line the route, while others held a two-minute silence at 14:00 BST outside police stations as the funeral service began.

Two police helicopters performed an aerial salute known as a "missing man formation", in which the aircraft bowed to the right, above the cathedral.

Image copyright Getty Images Image caption The order of service for the funeral had a picture of PC Palmer on its cover

Image copyright Reuters Image caption PC Palmer had served in the Metropolitan Police for 15 years

Image copyright AFP/Getty Image caption Police officers, some tearful, watched as the hearse went past them

Roy Ramm, a former Met Police Commander, said it was a "painful irony" to see officers riding motorcycles to clear the way for their colleague's funeral cortege.

"Normally they would be doing this for members of the Royal Family," he said.

"What must be going through their minds to be doing it for a fallen colleague?"

Image copyright Getty Images Image caption Tributes were paid to PC Palmer's courage

Image copyright Reuters Image caption The funeral cortege was led by the Dean of Southwark, the Very Reverend Andrew Nunn

"I don't think we will have ever seen a police funeral of this size," said Sara Thornton, who leads the National Police Chiefs' Council.

She said PC Palmer "didn't hesitate to act" when confronted by Masood.

"His bravery and his courage are something that all officers are very proud of, but also there is a tremendous sense of sadness and of loss."

Image caption PC Palmer, pictured on duty alongside a family of tourists

Special sergeant Matthew Warden, from Nottinghamshire, said he had made the journey "because we are all one big family".

Special constable Amanda Stansfield, from West Yorkshire Police, said she wanted to "show support" for her London colleagues.

Members of the public also gathered to watch the funeral cortege, while screens were erected outside Southwark Cathedral to broadcast the service.

Campbell McBryer, a retired counter-terrorism officer who served with Sussex police for 23 years, said he was "proud" of the support people had shown.

"I just sat and cried when I heard the news," he added.

Image copyright PA Image caption A police officer carried PC Palmer's helmet

Image copyright Getty Images Image caption Two police helicopters conducted an aerial salute over the door of Southwark Cathedral

Another well-wisher, David Lewis, from Orpington, said it was important for ordinary Londoners to pay their respects.

"It just shows as a country that we want to pay our respects to somebody that gave their life to protect the rest of us," he said.

The Metropolitan Police said more than 5,000 officers from the force and across the country were expected to gather in central London for the service and to line the route, which has seen dozens of roads closed to traffic for hours.

Son, husband, brother - and daddy

Image copyright Phil Coomes/BBC Image caption A floral tribute read "brother" and "husband"

By Laura Lea, BBC News, in Southwark

The usually bustling streets of Southwark were still this afternoon as people gathered to remember PC Keith Palmer.

Hundreds of officers - some of whom would have been colleagues - lined the roads as the funeral cortège made its way from Westminster to Southwark Cathedral.

Retired officers, members of the ambulance service, young cadets, tourists and office workers were among those in the crowds.

One former officer told me the huge sense of pride he felt for the "police family" across the country today. He just "had to be here", he added.

Overhead, loudspeakers filled the air with organ music as the hearse arrived and rows of police officers bowed their heads.

While composed, many were visibly upset as their fallen colleague was led past them.

PC Palmer's police family has been very visible today, but at the centre of this afternoon's service was a much smaller family.

The floral tributes around his coffin served as a reminder - "Son", "husband", and "brother".

But leading them all on the front of the hearse, emblazoned with roses was "No 1 daddy".

London streets fall quiet

PC Palmer's body had been lying in rest at the Palace of Westminster by special permission of the Queen.

The coffin was taken to the palace's Chapel of St Mary Undercroft on Sunday and received by a guard of honour from his police branch, the Parliamentary and Diplomatic Protection Command.

Members of his family attended a short private service in the chapel on Sunday, before officers watched over his coffin throughout the night ahead of the procession on Monday.

Image copyright PA Image caption PC Palmer's body had been lying in rest at the Palace of Westminster

The Very Reverend Andrew Nunn, the dean of Southwark Cathedral, told the BBC that it was important that the family could grieve privately, as well as for the public to pay their respects.

"I hope for the family they receive the comfort that they need through the service," he said.

"They're having to grieve publicly and that must be a very, very difficult thing."

PC Palmer, who had served in the Metropolitan Police for 15 years, also had his name added to the National Police Memorial, which records the names of officers who have been killed in the line of duty, during a special ceremony in London.

Image copyright PA Image caption PC Palmer's name has been added to the National Police Memorial in London

The funeral was the first engagement for new Metropolitan Police Commissioner Cressida Dick, who read WH Auden's poem Funeral Blues during the service.

Ms Dick said it had been "an enormous privilege" to take part in the "sad and poignant" ceremony.

"He arrested extraordinary numbers of criminals," she said.

"But he was genuinely also a friendly face of British policing."

Media playback is unsupported on your device Media caption Cressida Dick tells BBC News about the force's farewell to PC Palmer

Before attacking PC Palmer, Masood had driven his car into crowds on Westminster Bridge, causing injuries that have resulted in four deaths.

Romanian Andreea Cristea, 31, who fell from the bridge into the River Thames, died in hospital on Thursday.

Aysha Frade, 44, who worked at a London sixth-form college, US tourist Kurt Cochran, 54, and retired south London window cleaner Leslie Rhodes, 75, were also killed.

Masood was shot by police officers in New Palace Yard, inside the Westminster estate, after he had fatally stabbed PC Palmer.