The people of Singapore have bid farewell to longstanding leader Lee Kuan Yew with an elaborate procession and three-hour state funeral.

His son, the current prime minister, paid tribute to the statesman and declared that the wealthy city state he helped build is his monument.

Tens of thousands of people undeterred by heavy rains lined a nine-mile route through the city to catch a glimpse of the cortege.

Mr Lee's coffin, draped in Singapore's red-and-white flag and protected from the downpour by a glass casing, lay on a ceremonial gun carriage that was led past city landmarks from parliament to a cultural centre where the funeral was held.

Walking slowly in the coffin's wake as it exited parliament were Prime Minister Lee Hsien Loong, other family members and government officials.

Along the way, crowds of people chanted the dead leader's name, snapped photos with smartphones and waved Singapore's flag.

Four howitzers fired a 21-gun salute, air force fighter jets streaked over the island, with one peeling off in a "missing man" formation, and navy patrol ships blasted horns.

"To those who seek Mr Lee Kuan Yew's monument, Singaporeans can reply proudly: Look around you," Lee Hsien Loong said at a funeral service attended by more than 2,000 people including schoolchildren, Singapore's elite, world leaders and royalty.

During a week of national mourning that began on Monday after Mr Lee's death aged 91, some 450,000 people queued for hours for a glimpse of his coffin at Parliament House. A million people visited tribute sites at community centres around the city.

The expansive show of emotion is a rare event for Singapore and its 5.5 million people. The island nation is known around the world as a wealthy trade and finance centre with a strict social order.

Mr Lee was Singapore's prime minister for more than three decades, ruling with an iron grip until 1990. He is regarded by Singaporeans as the architect of their nation's prosperity and harmonious relations among ethnic Chinese, Malay and Indian populations.