Thousands mourn for Roh Moo-hyun
Tens of thousands of South Koreans have turned out in Seoul for the funeral of former President Roh Moo-hyun, who killed himself last week.
Top officials attended the ceremony, while huge crowds filled the streets.
Mr Roh dedicated himself to democracy and he would not be forgotten, PM Han Seung-soo said in a eulogy.
Authorities fear protests and the BBC's Chris Hogg in Seoul says there is a tense stand-off between riot police and protesters near City Hall.
There is much yelling, some speeches, lots of slogans, but the aggression appears to be mostly rhetorical for now, our correspondent says. Some 15,000 riot police are on stand-by.
Roh Moo-hyun jumped off a cliff last Saturday amid allegations of bribery, which he denied. His death has caused immense shock in South Korea.
Mr Roh was president between 2003 and 2008, when his term ended. Current President Lee Myung-bak's Grand National Party won the subsequent election, forcing Mr Roh's Uri party from office.
Supporters say Mr Roh was investigated for political reasons and some blame Mr Lee for a probe that they believe drove the former president to suicide, our correspondent says.
There was booing as Mr Lee laid a flower for his predecessor.
'Hunted by conservatives'
Millions of people have already visited altars around the country to pray for Mr Roh.
Chris Hogg, BBC News, Seoul
Tonight in Seoul, there is a stand-off on the wide avenue near City Hall.
On one side, there are ranks of riot police in their black uniforms and two mobile water cannon with red flashing lights cutting through the darkness in wide sweeps.
On the other side are the protesters. Earlier, they had been mourners. Now, many hours after the funeral has finished, they are refusing to leave.
There is much yelling. Some speeches, lots of slogans, but the aggression appears to be mostly rhetorical for now.
Whether that will change as the bars in the downtown district empty later on is not clear.
Early on Friday the funeral procession left Bongha, the village to which he retired, for the journey to Seoul.
As the hearse arrived in the capital, tens of thousands of supporters wearing yellow - his campaign colour - lined the streets.
The funeral was held at a former palace. Delivering the eulogy, Mr Han said Mr Roh had "spent his life fighting for human rights, democracy and the end of authoritarianism".
"We will strive to follow your last wishes for reconciliation, unity and a better nation," he said.
Crowds watched the service on a huge television screen. Then a public memorial rite was held at a grassy plaza outside City Hall.
"I am so sad. He was a president of the common people," Gum Young-Don, a 32-year-old accountant, told AFP news agency.
"Even if I did not support all his policies... he made great efforts to take care of the underprivileged and destroy authoritarianism in every corner of government."
"I think the former president was hunted by conservatives," said another mourner, housewife Lee Ae-ran.
Mr Roh's body will be cremated and his ashes taken back to Bongha.
2003 - elected president
2004 - suspended by MPs, then reinstated by court
2008 - leaves office
Apr 2009 - quizzed for alleged bribery
23 May 2009 - dies while mountain climbing
Mr Roh - a human rights lawyer - came from a humble farming family but rose to the highest office on a platform of clean government and reconciliation with North Korea.
Last month, he was questioned over allegations that he had taken more than $6m in bribes from a wealthy shoe manufacturer, Park Yeon-cha, who was indicted in December on separate bribery and tax evasion charges.
The former president later apologised for the scandal. But last Saturday he threw himself from a mountain near his home after leaving a suicide note.