Monday’s outcome, while perhaps puzzling to outsiders who are inevitably struck by Norway’s wealth, was broadly expected inside the country. “The wealth is also a problem for politicians,” said Bernt Aardal, professor of politics at the University of Oslo. “Every time there is a headline about health queues or deficiencies in health care for elderly people, everyone says that this shouldn’t happen in a country as rich as this one.”

Despite solid economic growth, thanks in no small part to North Sea oil, and one of the lowest unemployment rates in Europe, voters also simply seemed to crave change, analysts said. “Norway is very rich,” said Frithjof Jacobsen, chief political commentator at the tabloid newspaper Verdens Gang, known as VG. “We have hardly any unemployment. So it must be strange to see the government changing from the outside. But eight years is a very long time.”

Mr. Stoltenberg has been prime minister since 2005. Last month, he sought to revive his chances of another term by driving a taxi in Oslo, the capital, to “hear what people really think.” The stunt was at least partly staged, as some of the passengers had been recruited in advance and told to wait at a certain spot for Mr. Stoltenberg.

But Marianne Kiaer, a 45-year-old teacher who said she supported Labor in the last two elections but switched to the Conservatives this time, appeared to speak for many when she said, “Maybe eight years with Labor is enough.”

In Stavanger, Norway’s oil capital, Kjell Gamlen, 54, said he voted for the Progress Party because “we need something altogether new in Norwegian politics.”

Shara Ali, 20, a student and refugee from Iraqi Kurdistan who arrived in Norway in 2002, placed blame for the growing influence of the Progress Party on mainstream politics for delays in getting her citizenship. “We are all contributing,” she said of the immigrant population. “We are working and paying taxes.”

As some feared a harder line on immigration in a future coalition, some political observers said any impact of the Progress Party as a junior partner in a governing coalition would probably be minor.

“The Progress Party cannot be compared to the Front National in France or the Danish People’s Party or German neo-Nazi groups,” said Frank Aarebrot, a professor of comparative politics at the University of Bergen and a prominent political commentator. “Its libertarian streak is as strong as its anti-immigrant streak. The current leader is much more concerned with privatizing hospitals and schools than with immigration.”