Updated

British Prime Minister David Cameron joined thousands of mourners on Friday at the funeral of a soldier hacked to death on a London street in a suspected Islamist attack.

Cameron gathered with some 800 family members and colleagues of soldier Lee Rigby for the private military funeral at a church in Bury, near Manchester in northwest England.

Thousands of members of the public lined the surrounding streets.

Rigby, 25, was murdered in broad daylight near his army barracks in Woolwich, southeast London, on May 22. Two Muslim converts from Nigerian Christian families are due to stand trial for the murder in November.

The killing stunned Britain and sparked a rise in community tensions. Several mosques have been attacked while the far-right British National Party and English Defence league have held a string of anti-Islamic rallies.

Rigby's body was brought to the church on Thursday and members of his regiment kept an overnight guard of honour.

The soldier, a drummer in the 2nd Battalion Royal Regiment of Fusiliers, had survived a tour in Afghanistan.

In his eulogy, Rigby's commanding officer Lieutenant Colonel Jim Taylor described the soldier as a "larger-than-life personality".

"To be with Lee was to be where it was most fun -- the centre of good times and much mischief," he told the mourners.

"He was always happy. His smile was infectious, as was his enthusiasm for soldiering and his passion for life."

Rigby's family thanked people "around the world" for their "overwhelming" support.

His wife Rebecca, 30, attended the funeral with the couple's two-year-old son Jack, whose T-shirt bore the words: "My Daddy, My Hero".

His sisters embraced each other in tears outside the church.

Cameron said on his Twitter account on Friday ahead of the funeral: "A sad day with the funeral of Fusilier Lee Rigby, who was killed in Woolwich. My thoughts are with his wife Rebecca and his family."

Michael Adebolajo, 28, and 22-year-old Michael Adebowale are due to go on trial accused of Rigby's murder on November 18.

Adebolajo is further charged with the attempted murder of two police officers, and both men are charged with possession of a firearm.