Photo/Illutration Oh Se-hoon, candidate of the main opposition People Power Party, holds flowers while watching televisions broadcasting the counting for the Seoul mayoral by-election at party headquarters in Seoul, South Korea, on April 8. (AP Photo)

SEOUL--South Korea’s conservative opposition party has won sweeping victories in mayoral by-elections in the country’s two biggest cities, votes seen as a test of public sentiment ahead of next year’s presidential election.

Oh Se-hoon of the opposition People Power Party won 57.5 percent of the votes cast in Wednesday’s election in Seoul, the capital city, according to the final vote tally released by the National Election Commission. Park Young-sun of the ruling Democratic Party won 39.2 percent of the votes.

In the mayoral election in Busan, the country’s second-largest city, People Power Party candidate Park Heong-joon beat Democratic Party candidate Kim Young-choon by about 28 percentage points, the tally showed.

In recent months, President Moon Jae-in and his ruling party have been grappling with falling approval ratings due to soaring house prices, allegations of real estate speculation involving public officials and other purported policy missteps.

The mayor seat in Seoul was vacant after previous Mayor Park Won-soon killed himself, while the seat in Busan was empty after previous Mayor Oh Keo-don resigned. Both had faced allegations of sexual harassment and both were affiliated with the Democratic Party.

Moon, whose single five-year term ends in May 2022, is barred by law from seeking a re-election.

According to recent opinion surveys, former Prosecutor General Yoon Seok-youl, who quit following disputes with Moon allies, is the early favorite in next year’s election. Yoon hasn’t formally announced his presidential bid and it’s unclear on which party ticket he would run.

Lee Jae-myung, the governor of Gyeonggi province surrounding Seoul, and former Prime Minister Lee Nak-yon, have been ranked the second and third in the surveys. Both are Democratic Party members.

Moon, who champions rapprochement with North Korea, had an approval rating of more than 80 percent after his first summit with North Korean leader Kim Jong Un in 2018. He was a driving force behind now-stalled U.S.-North Korea nuclear diplomacy. But ties between the rival Koreas are currently strained as North Korea has urged his government not to meddle in its dealings with Washington.