By Linda Sieg and Chisa Fujioka

TOKYO, Sept 14 (Reuters) - Japanese Prime Minister NaotoKan will keep his job after an unexpectedly decisive victory ina ruling party vote on Tuesday, but must now unify his partyand forge deals with the opposition in a divided parliament.

Kan, 63, who has pledged to curb spending and borrowing, isstruggling with a strong yen, a fragile recovery and publicdebt that is twice the size of Japan's $5 trillion economy.

Markets had been braced for a shift toward aggressivespending if Kan lost to Ichiro Ozawa, a scandal-taintedpowerbroker who had said he would consider issuing more debt ifthe economy worsened.

The Democratic Party of Japan (DPJ) has floundered sincesweeping to power a year ago, and its coalition with a tinypartner lost their upper house majority in a July electionunder Kan. He took over from unpopular Yukio Hatoyama in Juneas Japan's fifth leader in three years.

"Kan won by quite a big margin. But he still needs to comeup with ways to pass legislation through parliament, such as byteaming up with an opposition party," said Koichi Haji, chiefeconomist at NLI Research Institute.

"The outlook doesn't look good for Kan."

The yen briefly rose to another 15-year high of 83.09 perdollar after Kan won, but then traded back to about 83.30.Kan's government has repeatedly expressed concern about theyen's rise and its impact on the export-dependent economy, butso far has refrained from intervening in the market.

Ten-year Japanese government bond futures rose after Kan'swin soothed worries about a shift to expansionary fiscalpolicy.

OZAWA'S NEXT MOVE

Ozawa, 68, had promised to stick to election campaignpromises to give consumers more cash and pry control overpolicy away from bureaucrats to refocus budget spending.

He had also pledged to do everything to curb the yen'srise, even if that meant a solo intervention, and could havepressured the Bank of Japan to buy government bonds to fund hisspending plans.

"Whoever won, there would be much difficulty binding theparty together again, and in that sense Kan has to adopt someof the agenda raised by Ozawa or his supporters," said YuukiSakurai, CEO and President, Fukuoka Capital Management.

The DPJ last year ousted the Liberal Democratic Party(LDP), ending more than 50 years of nearly non-stop rule by theconservative party, but it has stumbled and the upper houseelection loss under Kan upset Ozawa and his followers.

Kan won just over half of the votes cast in the leadershipcontest by DPJ parliamentarians, but trounced Ozawa in votingamong the party rank-and-file.

"This outcome is better than Ozawa's win, but it doesn'tmean people are really supporting Kan," said university studentSaburo Takahashi. "It's just choosing the better one of thetwo, but I don't think many people will expect Kan to push forbig changes."

While Ozawa has been known as "Destroyer" for breaking upparties he led, he is not expected to leave the party rightaway.

Still, Kan will need to reach out to members of Ozawa'scamp to unify the party and even then, Ozawa may remain athreat.

"I guess the next occasion is when Kan's support rates godown and then there will be an opportunity for Ozawa to playanother trick," said Koichi Nakano, a professor at SophiaUniversity. "I don't think he will be finished until he is deadand buried. At the end of the day, he is a destroyer."

Confronted with runaway debt, Kan has called for debate onraising the 5 percent sales tax to fund the growing socialwelfare costs of a fast-ageing population but it is unclear ifopposition parties will help him pass bills in the dividedparliament. (Additional reporting by Yoko Nishikawa, Yoko Kubota, KiyoshiTakenaka and Antoni Slodkowski; Editing by Tomasz Janowski)