Mourners pay their respects to former Japanese PM Shinzo Abe
The 67-year-old was shot dead on Friday while speaking at a campaign event in the southern city of Nara.
On Tuesday, a hearse carried the body of the country's longest-serving prime minister through the capital to the funeral hall where he was cremated.
A private funeral had been held earlier at the Zojoji temple.
Across Tokyo, flags flew at half mast and outside the temple, a long line of mourners stretched over two blocks, many carrying bouquets.
The hearse travelled past the headquarters of Abe's Liberal Democratic Party (LDP) before making its way to the prime minister's residence, where current PM Fumio Kishida and other lawmakers received the motorcade.
After that it passed the parliament building, where Abe first entered as a lawmaker in 1993, before arriving at the Kirigaya Funeral Hall.
Shinzo Abe's funeral was supposed to be a private affair, closed to all but family and friends. But Japan's public had decided otherwise.
From early on Tuesday morning, they began lining up outside the giant Zojoji temple in central Tokyo to lay flowers at the small table set out to one side of the main complex.
The weather forecast was heavy thunder showers, but as the funeral service began inside the crowds on the streets outside only grew larger.
By 14:30 local time (06:30 GMT) there were tens of thousands of people lining the streets all the way from the Zojoji to the parliament building at Nagatacho.
Many in the crowds lining up Tokyo streets were seen praying and crying
Outside the prime minister's office, as the funeral cortege approached, a hush fell across the crowds and all you could hear was the news helicopters circling above.
Mourners bowed to Mrs Abe, sitting in the front of the hearse, holding her husband's funeral tablet. People began to sob loudly. Then some shouted out. "Abe-San, thank you so much."
A few seconds later the hearse was gone. A middle-aged woman in the crowd dabbed her eyes with a handkerchief.
"We will never have another politician like him," she said.
Abe was undoubtedly a divisive and controversial figure. His views on the history of World War Two were often troubling.
But to the crowds of Japanese who turned out to say goodbye to him, "Abe-San" was just the best prime minister they'd known.
Abe was one of Japan's most influential politicians. And his death has sent shockwaves through a nation where incidences of gun violence are extremely rare.
Police said the gunman targeted Abe due to grievances he had with a religious group that he believed Abe was a part of. But they are still investigating what the gunman's motives were and whether he acted alone.
Akie Abe carrying her husband's tablet after the funeral
A vigil held on Monday evening drew hundreds of dignitaries as well as thousands of ordinary Japanese citizens who came to lay flowers.
"I came here to offer flowers because I think he gave the Japanese something to be proud about," said Emi Osa.
Abe's death drew an outpouring of shock from prominent world leaders, with UK Prime Minister Boris Johnson condemning the shooting as a "despicable attack".
US President Joe Biden called Prime Minister Kishida to express his "outrage, sadness and deep condolences", and called the assassination "a tragedy for Japan".
-- Courtesy of BBC News