SEOUL, South Korea — South Korean voters handed President Park Geun-hye’s party a surprising setback on Wednesday, stripping it of a majority in Parliament as her government faces a sluggish economy and a growing nuclear threat from North Korea.

Ms. Park’s conservative Saenuri Party won only 122 seats in elections for the 300-member National Assembly. It became the first South Korean governing party in 16 years without a parliamentary majority, leaving Ms. Park to face the prospect of being an early lame duck. The main opposition Minjoo Party won 123 seats, replacing Saenuri as the top political group in Parliament even though it, too, lacks a majority.

The vote has been widely billed as a referendum on Ms. Park and a bellwether for the presidential election in late 2017. Pollsters had predicted an easy majority for her party. “We failed to read the minds of the people, even when they were disappointed and reproached us,” said An Kyeong-hwan, a spokesman for the governing party.