Voters dealt Singapore's ruling People's Action Party its third electoral setback in a year, allowing the opposition to hold onto a Parliament seat in a by-election.
Workers' Party candidate Png Eng Huat, a 50-year-old businessman, won 62% of about 21,700 votes cast in Hougang district, while PAP candidate Desmond Choo received 38%, election officials said.
The PAP still controls 81 of 87 parliamentary seats, but it has struggled to staunch growing discontent over a surge in foreign workers, soaring housing and transport costs, and stagnant salaries for low-wage earners.
The Southeast Asian city-state island of 5.2 million people has one of the world's highest standards of living.
"We've done our best to address important national issues like housing and transportation, immigration and population, economic upgrading and workers' incomes," Prime Minister Lee Hsien Loong, who is also PAP's secretary-general, said in a statement.
"We've made progress but there is much more to be done."
Lee and other PAP leaders campaigned frequently for Choo during the nine-day campaign.
The government called the by-election after the Workers' Party earlier this year expelled lawmaker Yaw Shin Leong when he refused to explain allegations of personal indiscretions.
Choo, a 34-year-old union official, suffered his second defeat in Hougang in a year. He lost with 35% of the vote to Yaw last May during a general election in which the PAP won 60% of the total vote, its lowest level of popularity since independence in 1965.
In August, the PAP's candidate for president a largely ceremonial position won by less than 1%age point with 35% of the vote.
The Workers' Party's six parliamentary seats are the most the opposition has held since Singapore split from a short-lived federation with Malaysia. The WP has represented Hougang since 1991.
Workers' Party secretary-general Low Thia Khiang urged the government to stop its policy of limiting improvements to public housing in districts that elect opposition candidates. About 80% of Singaporeans live in public housing apartment blocks.