The head of the ruling Liberal Democratic Party (LDP), Taro Aso, was elected Japan's prime minister on Wednesday after Yasuo Fukuda and his cabinet resigned en masse earlier in the day.
Aso, 68, received 337 votes from the 478 members in the LDP-controlled House of Representatives, which has the final say in selecting a prime minister. The opposition Democratic Party of Japan President Ichiro Ozawa got 117 votes.
The upper house of parliament endorsed Ozawa in a second-ballot vote of 125 to 240. Aso received 108 votes.
Representatives of the two houses will meet to make a final decision soon. Aso is certain to prevail because the lower house overrides the upper house decisions.
The LDP elected the conservative Aso as its president Monday after Fukuda announced his resignation.
The grandson and son-in-law of former prime ministers, Aso was expected to serve out Fukuda's remaining term through September 2009.
Aso was expected to name his cabinet later in the day, aiming to build unity ahead of a general election to be held soon.
The new premier has already picked several ministers unofficially.
Former education minister Takeo Kawamura, 65, was expected to serve as chief cabinet secretary.
Former education minister Hirofumi Nakasone, 62, who is the son of former prime minister Yasuhiro Nakasone, was to serve as foreign minister.
Former LDP policy chief Shoichi Nakagawa, 55, who has close ties with Aso, was to be appointed as finance minister, and Yasukazu Hamada, 53, as defence minister.
The premier was expected to appoint his election contenders Kaoru Yosano, 70, as economic and fiscal policy minister, and Shigeru Ishiba, 51, as farm minister.
Former prime minister Keizo Obuchi's daughter, Yuko Obuchi, would be the youngest minister in post-war Japan at 34 years old, in charge of tackling the declining birthrate.
Health, Labour and Welfare Minister Yoichi Masuzoe, 59, and Environment Minister Tetsuo Saito, 56, of the New Komeito party are expected to be reappointed to their current posts.