TOKYO  Prime Minister Taro Aso faced the possibility of a revolt in his own party on Monday, after a bruising defeat in a local vote forced him to call for a general election in which his Liberal Democratic Party faces almost certain defeat.

Mr. Aso had been trying to put off the national elections, now set for Aug. 30, in part because polls had shown that his party could lose its almost unbroken 54-year grip on power. Mr. Aso’s hand appeared to have been forced, though, by a poor showing on Sunday in a municipal election in Tokyo.

With both Mr. Aso and the conservative Liberal Democrats sinking in opinion polls, political experts say that the prime minister may face the wrath of his own party members, who fear their organization could break apart if it finds itself in the unusual position of losing power.

A poll conducted last week for Asahi Shimbun, one of Japan’s largest newspapers, showed that 37 percent of those surveyed said they would vote for the opposition Democrats in national elections, compared with 22 percent for the Liberal Democrats. A poll last week by another newspaper, Yomiuri Shimbun, found Mr. Aso’s approval rating had fallen to 20 percent.