South Korea's main opposition party is set to win in Wednesday's mayoral elections in the nation's two biggest cities, Seoul and Busan, by solid margins, according to the results of exit polls released by local broadcasters, likely dealing a blow to the ruling camp less than a year from the next presidential election.

Recent opinion polls had shown the ruling Democratic Party's candidates trailing their People Power Party rivals in both cities, reflecting falling public support for President Moon Jae In over soaring housing prices and related scandals.

The mayoral contests were among the 21 by-elections held Wednesday to elect public officials in three cities and six provinces. Voting ended at 8 p.m.

In the capital, the Democratic Party's Park Young Sun faced the People Power Party's Oh Se Hoon. In the last public survey released before Wednesday, 57.1% of respondents supported Oh, while 36.1% were for Park.

Park, before running for Seoul mayor, headed the SMEs and Startups Ministry in the Moon administration and was a four-term lawmaker. Her rival Oh served as Seoul mayor in 2006-2011.

In the southern port city of Busan, Kim Young Choon, former head of the Oceans and Fisheries Ministry, ran as the Democratic Party candidate against People Power Party candidate Park Heong Joon.

The Seoul and Busan mayoral contests were being closely watched as they serve as a barometer of public sentiment ahead of the presidential election next March. In South Korea, a president only serves a single five-year term.

Reflecting the importance of the by-elections, early voting held Friday and Saturday saw turnout of 20.54%, one of the highest rates in South Korean election history, according to the National Election Commission.