Japan's parliament has formally installed Yasuo Fukuda as the new prime minister to replace Shinzo Abe.
Mr Fukuda faces a tough task reversing the LDP's unpopularity
The 71-year-old won the support of 338 lower house members, nearly 100 votes more than is needed for a majority.
Although the appointment was slightly delayed after he lost the upper house vote, the outcome in the lower house prevails under Japan's constitution.
Mr Fukuda, a ruling Liberal Democratic Party (LDP) veteran, is set to name members of his new Cabinet later.
He has been chosen because the LDP wants a safe pair of hands after the party's popularity plummeted under Mr Abe, correspondents say.
Mr Abe officially resigned along with his entire Cabinet earlier on Tuesday.
He has been treated in hospital for stress-related stomach problems since he quit 12 days ago, throwing the country into political confusion.
Members of the lower house of parliament - where there is an overwhelming government and coalition majority - voted first for the new prime minister.
Mr Fukuda easily beat off his closest competitor, the main opposition leader Ichiro Ozawa, in a vote that went mainly along party lines.
The upper house, which the LDP lost control of in July's election, voted for Mr Ozawa over Mr Fukuda by 133-106 votes.
A joint committee of both houses then met to try to resolve the issue, but failed to reach agreement.
However, the outcome of that meeting was immaterial as the decision of the lower house is regarded as final under the terms of the constitution.
"Because the two houses could not reach an agreement, the lower house decision will be adopted," speaker Yohei Kono said, declaring Mr Fukuda prime minister.
Mr Fukuda becomes Japan's oldest prime minister since the early 1990s.
He has a tough task ahead of him as his party is unpopular and the opposition plans to block his legislative programme, the BBC's Chris Hogg in Tokyo says.
Mr Abe's formal resignation brought to an end a year-long premiership plagued by ministerial scandals, which culminated in July's disastrous upper house election losses for the LDP.