TOKYO — Shintaro Ishihara has been a rare, flamboyant presence in Japan’s otherwise drab political world for four decades. A novelist turned right-wing firebrand, he has long held celebrity status on the political margins, where he was known for dramatic flourish. He once signed a pact in blood to oppose diplomatic ties with China because of its communist government, and he published a book at the height of Japan’s economic power that lectured his countrymen on the need to end what he considered its postwar servility to the United States.

Now, at 80, Mr. Ishihara is leading a newly formed populist party and has emerged as a contender for prime minister, vowing to turn Japan into a more independent, possibly nuclear-armed nation. While political analysts deem him a long shot, they say the fact that he has gotten this far after decades of pushing what was seen as a fringe agenda is a worrying sign of how desperate this nation is for strong leadership after years of cascading troubles.

With his promises to restore Japan’s battered national pride, Mr. Ishihara has staked out an even more stridently nationalistic position than the current front-runner, Shinzo Abe, the leader of the conservative Liberal Democratic Party, who has called for revising Japan’s pacifist constitution. Analysts worry that if Mr. Ishihara succeeds in his bid to become prime minister, he could weaken relations with the United States, yank Japan to the right and damage ties with China, which is already angered by his almost single-handedly rekindling a territorial dispute over an island chain.

But even in the likely event that Mr. Ishihara loses, they say, his campaign could still have a lasting effect, bringing patriotic populism into the political mainstream of a nation that has shunned such open jingoism since its devastating defeat in World War II.