TOKYO  Prime Minister Yasuo Fukuda announced on Monday night that he would resign, abruptly ending his chronically unpopular government after just a year and leaving Japan’s governing party scrambling to find fresh leadership ahead of crucial national elections.

Mr. Fukuda’s surprise announcement, made at a hastily called news conference, startled Japan and appeared to plunge the world’s second largest economy into further political confusion. Last year, Mr. Fukuda’s predecessor, the rightist Shinzo Abe, made an equally sudden resignation.

Mr. Fukuda’s decision was particularly unexpected because he took office last September as a veteran political insider widely counted on, after Mr. Abe’s hasty departure, to bring stability and restore the Liberal Democratic Party’s tarnished credibility. In the end, Mr. Fukuda, 72, lasted about as long as Mr. Abe, roughly a year.

His resignation was also surprising to many because it came just a month after he had reshuffled his cabinet, and just days after he unveiled a $17 billion economic stimulus package.