Prime Minister Junichiro Koizumi's ruling Liberal Democratic Party suffered a setback in key upper house elections Sunday, as Japanese voters handed decisive gains to the opposition Democratic Party, which has criticized Koizumi for keeping troops in Iraq.

The governing coalition led by the Liberal Democratic Party (LDP) held on to its majority in the upper house of the Diet, or parliament. But the LDP lost one seat while the Democratic Party gained 12, according to final results released Monday morning.

Some opponents immediately demanded that Koizumi dissolve the Diet and hold new elections, but the prime minister and other LDP officials said he would remain in office. Nevertheless, analysts said Koizumi -- the Bush administration's closest ally in Asia and once a highly popular political figure here -- is bound to emerge from the vote with diminished influence and a damaged reputation.

Koizumi has championed difficult economic reforms in Japan, which some economists say have played a role in an increasingly strong recovery after 13 years in the doldrums. Koizumi sought to focus the public's attention on the economy Sunday evening. "I would like to continue to push forward my reform policies and further obtain confidence from the public," he said in a televised session with Japanese television reporters.

But Koizumi's approval rating has sunk to around 36 percent in recent weeks, with disclosures about the prime minister's involvement in a scandal involving politicians who failed to make payments into the national pension system. He also has been criticized for deciding to keep Japan's Self-Defense Forces in Iraq after the transfer of political authority there last month.

Many people in line to vote Sunday also expressed skepticism about Koizumi's overtures toward North Korea, including his surprise decision to fly there for a summit in May. Some saw his trip to Pyongyang as an attempt to distract the public from his domestic political woes.

"I feel he used the issue of North Korea for politics," Sachiko Okayasu, 24, a customer representative for a Tokyo company, said after she voted in a southern district of the city.

Half of the seats in the 242-member upper house were being contested Sunday. Koizumi's Liberal Democratic Party, which has ruled Japan for most of the post-World War II era, held on to 49 of the 50 seats it had in play. The opposition Democrats, meanwhile, won 50 seats -- a gain of 12 slots.

The new tallies leave the ruling coalition -- Koizumi's party and its political partner, the Buddhist-rooted New Komeito party -- in control of the upper house with 139 seats. But it brings the Democratic Party up to a record 82 seats, continuing a trend in Japan toward the creation of a two-party system.

"I have a real feeling that we have entered a genuine era of a two-party political system and a time of actual choice of power for the Japanese people," Katsuya Okada, head of the Democratic Party, told reporters in Tokyo on Sunday. "I believe that our genuine appeal toward the public and our criticism toward the LDP policies have reached the people."

Special correspondent Akiko Yamamoto contributed to this report.

Prime Minister Junichiro Koizumi puts a rosette on the name of a victorious Liberal Democratic Party candidate. The governing coalition kept a majority in the upper house of the Diet; the main opposition party has 82 of 242 seats.