FOR those who despair of Japan's politics, the prospect of a leadership contest between a trainspotter, a cabinet minister who burst into tears in parliament and somebody who exonerates war criminals might sound depressing. But since the prime minister, Naoto Kan, revealed that he would step down on August 30th, the trainspotter has set things alight.

By declaring his candidacy, Seiji Maehara, a 49-year-old former foreign minister, instantly became the front-runner within the ruling Democratic Party of Japan (DPJ) to replace Mr Kan. Several times this summer, as the unpopular Mr Kan wavered over whether to quit or not, Mr Maehara indicated that he would not run, so his decision comes as a surprise. If he wins, he will represent a refreshing new generation of modernisers. But so fractious is the DPJ, little can be taken for granted.

Between Mr Maehara and the prime minister's job stand a handful of less inspiring rivals and one burly obstacle, Ichiro Ozawa, a divisive figure who controls the DPJ's biggest faction (and who has been indicted in a funding scandal). Of the party's 398 lawmakers who can vote on Mr Kan's replacement on August 29th, he leads a group of some 130, compared with Mr Maehara's 40. Mr Ozawa's attacks on Mr Kan helped to bring him down and nearly split the party. As The Economist went to press, he remained non-committal about Mr Maehara, but in the past the two men have been firmly at odds.

Mr Maehara's task is a delicate one. If he courts Mr Ozawa, he will put off many of his supporters. “Some people, including me, regard Mr Ozawa as the symbol of old politics,” says Keisuke Tsumura, a DPJ lawmaker. But the party's anti-Ozawa camp is also split, because Yoshihiko Noda, the finance minister, may also run and he shares some supporters with Mr Maehara.

None of the main hopefuls is without blemish. Mr Maehara blundered during a brief stint as opposition leader five years ago, and he quit as foreign minister in March over a fuss about an illegal donation from a Korean woman. Mr Noda lacks charisma, and recently issued a bizarre exoneration of war criminals. Banri Kaieda, the trade minister, did nothing for his chances when he broke down in tears under opposition attack.

The new prime minister will be the sixth since Junichiro Koizumi—the last with either charisma or authority—stepped down in 2006. Mr Maehara is the best chance the DPJ has of somebody even approaching Mr Koizumi's stature.

What is more, in the pre-election campaigning, real policy issues are coming to the fore. In debt-strapped Japan, Mr Maehara thinks promoting growth should come before tax increases. Mr Noda says raising taxes is the priority. No candidate has yet explained how to rebuild Tohoku, devastated by the earthquake, tsunami and nuclear accident in March.