In nearly a decade of democracy following the overthrow of Western Europe's longest-surviving dictatorship, Portugal veered toward a Communist takeover, faltered under a series of minority Socialist governments and appeared finally to approach stability under a majority conservative coalition.

The coalition has a comfortable margin of seats in the National Assembly and a clear program of reforms and broad popular support. But the promise of stability again appears to have slipped away as feuding among coalition factions has produced a stalemate.

After weeks of dispute over the choice of a leader to succeed premier Francisco Pinto Balsemao, who resigned last month, President Antonio Ramalho Eanes ordered the dissolution of the National Assembly and called early general elections to be held in April.

Gen. Eanes, 48, a left-leaning opponent of the ruling conservatives, somberly noted that the action, leading to the country's 15th government since the 1974 election, was a costly but essential step in the midst of a series of government crises that have edged an ailing economy closer to the brink of collapse.

The new election, however, raises the possibility of a political realignment that could open the way for the popular Eanes, who must step down as president in 1985, to enter the fray with a new left-of-center party.

Balsemao's unexpected resignation was provoked by persistent attacks on his leadership from hard-liners in his Social Democratic Party, which is the senior partner in the ruling coalition known as the Democratic Alliance. The critics accused Balsemao, 46, of inertia on the economic front and charged that he has failed to face up to Eanes.

The critics were not mollified by constitutional revisions steered through by Balsemao to diminish the president's powers and abolish Eanes' unelected advisory body, the military Revolutionary Council, nor by a national defense statute that firmly subordinated the armed forces to government control.

When his detractors blamed him for a 5 percent swing to the opposition in nationwide municipal elections last December, Balsemao quit. "Petty politics, betrayals and misunderstandings" had brought him to the limit of endurance, he said.

The coalition had two remaining years of its mandate to run and the junior coalition partner, the rightist Christian Democrats, pressed to bolster their influence in the Cabinet.

Balsemao, as president of his party, resisted the challenge, naming as his successor to the premiership a little-known protege, former education minister Vitor Pereira Crespo. The action brought on the resignation of Christian Democratic leader and deputy premier, Diogo Freitas do Amaral, 42, and set the stage for the impasse.

Crespo's administration seemed doomed even before it was fully formed. The coalition partners wrangled bitterly for three weeks over the lineup of ministers, and leading government figures, clearly sensing its fate, refused to serve. The coalition outwardly protested, but prominent leaders said there were sighs of relief when Eanes ruled the Crespo Cabinet did not command the political support to guarantee its own survival and called the early election.

Eanes has called on Balsemao to remain in office as caretaker to avoid delay in tackling a deepening economic recession. But Balsemao, aware of the corrosive effect that taking inescapable austerity measures could have on his party, is pressing for cross-party support in the National Assembly for a package of emergency measures. The opposition parties are expected to ratify the proposal before the assembly is dissolved in February.

From the Moscow-oriented Communist Party to the extreme right, all sides accept that severe restrictions are inevitable in controlling an economic crisis marked by a current-accounts deficit of more than $3 billion, aggravated by inflation running at 23 percent a year while unemployment is estimated at 16 percent and rising.

The caretaker administration is expected to be empowered to resume negotiations with the International Monetary Fund for a $100 million loan. The loan would aid negotiations for other loans to meet interest payments due this year.

The interim government may also reopen talks with Washington on an important military aid package under which the Reagan administration is seeking a satellite-tracking station and the use of air bases on the Portuguese mainland to fuel its Rapid Deployment Force.

With the spring election, the opposition Socialists are again expected to become the biggest single party, but without an overall majority. Leader Mario Soares, after the fall of his second minority government in 1979, said he would not govern again without a secure margin of seats in the assembly.

Soares could form a coalition with the Social Democrats, which Balsemao has hinted broadly he is ready to accept. This would meet a long-held ambition of President Eanes, who holds that it would be the most stable alignment and the most accurate reflection of the country's political aspirations.

But Soares, 59, would have to alter his stance toward Eanes, whom he labels "a Portuguese Peron" anxious to lead a populist movment centered on himself.