TOKYO — Dealing a blow to Japan's political elite, maverick reformer Junichiro Koizumi defeated a former premier to win the ruling party presidency Tuesday, guaranteeing his election as the next prime minister.

The 293-155 vote by party members over former Prime Minister Ryutaro Hashimoto capped a stunning upset by Koizumi, who was hoisted to the pinnacle of the Liberal Democratic Party by an overwhelming show of support by the 2.3 million rank-and-file members in the primaries.

The election reflects growing public disgust with the political establishment and the sour economy, and the LDP's desperate attempt to revamp its stick-in-the-mud image ahead of upper house Parliamentary elections this summer.

"This election was held against an unprecedented headwind," Koizumi, 59, said. "I promised to change the party and to change Japan, and fortunately, many party members supported my call."

Koizumi, certain to be formally named prime minister later this week by the LDP-dominated Parliament, takes office as Japan is wallowing in a decade-long economic slowdown. Unemployment is high, a hoped-for recovery has fizzled and the financial system is riddled with bad debts.

Japan's political system is also in trouble. Koizumi is the ninth prime ministers in just 10 years. He takes over from Prime Minister Yoshiro Mori, whose dismal year in office has been defined by a string of scandals, political gaffes and support ratings in the single digits.

Koizumi, a former health minister known for his wavy hair and fiery rhetoric, is pushing economic and structural reforms, including the privatization of Japan's postal system, which offers savings accounts and even insurance policies to the public.

Koizumi says the postal system is inefficient, but many in the party derive political support from it and oppose any change.

In a news conference Tuesday evening, Koizumi discussed everything from economic policy to foreign relations. He was short on specifics, saying details would have to wait until he filled top posts. But he said the U.S.-Japan relationship was "the foundation" of Tokyo's foreign policy.

Apprehension was growing in some parts of Asia that Koizumi was hawkish on defense. On Tuesday, he defended visits to a Tokyo shrine honoring Japan's war dead, including World War II war criminals.

Nevertheless, the Japanese stock market rallied on the news of Koizumi's win. The benchmark 225-issue Nikkei Stock Average started sharply lower, but rallied strongly after the election to finish 0.2 percent up.

Despite offering style and emotion, Koizumi's political roots are in the mainstream: His grandfather was vice speaker of the lower house of the Parliament and his father was defense minister.

Speculation was rampant in Japan about the extent to which Koizumi would have to water down his policy proposals in order to maintain the backing of the LDP's still-powerful old guard.

"The chances are not low that if he makes compromises with the various party powerbrokers, then there will be little change," said Takashi Inoguchi, a politics expert at Tokyo University. "But if his performance in Parliament is good, then he can achieve a good deal, because he has ideas."

Tuesday's vote was among the LDP's 346 members of Parliament. That tally was added to Koizumi's clinching on Monday of 123 of the 141 votes allotted to the LDP's local chapters — the first time that the regional offices had been given so many votes for party president.

The vote was seen within the party as a call for change.

"He won because he was a maverick," said LDP lawmaker Nobuteru Ishihara, son of Tokyo Gov. Shintaro Ishihara. "People are suspicious of those who represent vested interests, and the LDP members felt the same way."

A third candidate, Economics Minister Taro Aso, won 31 votes. Three of the 487 ballots were declared null and void. Koizumi got a late boost from LDP policy chief Shizuka Kamei, who dropped out of the race late at the last minute and threw his support behind Koizumi.

Hashimoto, premier from 1996 to 1998, had been expected to win based on his power bloc in the party. But he was rejected overwhelmingly in the local primaries, where party members were sensitive to his reputation for mismanaging the economy during his term in office.

In the aftermath of the election, attention on Tuesday shifted to Koizumi's Cabinet choices after his selection by Parliament, which was scheduled for Thursday.

Koizumi is widely expected to give one Cabinet portfolio to Makiko Tanaka, another outspoken party member who enjoys broad popular support.

Tanaka — though a high-profile critic of the party status quo — is the daughter of the late Prime Minister Kakuei Tanaka, who was forced out of office and disgraced by a bribery scandal in the 1970s.

"This is our last chance to change the party," said Tanaka, who campaigned hard for Koizumi in recent weeks. "We must respond to the hopes of the people."