For a fleeting moment this week Prime Minister Suleyman Demirel actually appeared to be in control of his politically fragmented nation. He came out in support of snap elections that, he apparently calculated, would give him a parliamentary majority and the power to stem Turkey's drift into chaos.

Today, that illusion of decisiveness and cohesion collapsed. Demirel's chief coalition partner, Neemettin Erbakan, reversed his agreement on elections and moved to open negotiations for a new government with opposition leader Bulent Ecevit.

Demirel's own political fortunes also may have been seriously damaged by the sudden turnabout. At a minimum, this week's events have exacerbated the personal rivalries and sharp political divisions that have plagued Turkish politics for more than a decade.

For it was Erbakan, the leader of the small Islamic National Salvation Party, who had encouraged Demirel to push for early elections this fall. Erbakan and the third member of Demirel's fragile coalition -- Alparslan Turkes, of the rightist National Action Party -- both endorsed the idea in private negotiations with Demirel.The prime minister then got his own right-of-center Justice Party to endorse the snap election.

Erbakan is an unpredictable politician who has shifted his support between Demirel and Ecevit in the past as a means of enhancing the influence of his own party. It was Erbakan who last week presented a motion to a parliamentary committee asking that elections be held this fall rather than on their scheduled date next spring. Demirel's Justice Party then voted unanimously to support early elections. This seemed to clear the way for parliament's approval.

But Erbakan failed to get Demirel to agree to give the National Salvation Party up to nine new seats in the next Cabinet. Erbakan then turned to Ecevit, who had been seeking a way to stall early elections.

For the past three days, the debates on the issue in the parlimentary committee have been stormy, with rival politicians insulting each other and occasionally even getting into fistfights.

An angry Demirel denounced his coalition partner, and said it was the National Salvation Party that must bear the blame for the country's parliamentary disorder. "See what they have said and see what they are doing," he said.

"Those who complain about the government should accept the nation as a reference, and accept the ruling of the people through elections."

Demirel had wanted early elections because of signs that Ecevit's Republican People's Party is in disarray, wracked by internal arguments over Ecevit's leadership. The Republican People's Party holds 209 seats in the 450-seat parliament, while the Justice Party holds 185 seats.

Demirel and Ecevit have been political rivals for years. Since the early 1970s they have alternated as prime minister, and neither has been able to win a parliamentary majority. As a result, they have had to construct coalitions with such implausible splinter parties as those of Erbakan and Turkes, who have had far more influence in national government than their limited support at the polls might indicate.

Diplomats in Turkey have despaired over the successive governments of Demirel and Ecevit. They say that until Turkish voters give one party a majority -- or until the two leading parties form their own coalition -- it is not likely that a Turkish government will be able to take the strong measures needed to curb the rampant political terrorism that this year alone has killed more than 1,400 persons.

Earlier this year, at the urging of the Turkish armed forces -- the final arbiters of the nation's politics -- Ecevit did offer to join Demirel in a coalition. But Demirel -- who last succeeded Evevit as prime minister only last November -- refused. Diplomatic observers say Demirel apparently was reluctant to do anything that might boost his rival's standing.

Demirel has allowed his disagreements with Ecevit to deadlock the parliment for four months over the issue of who should be elected president. The office is held in the interim by Senate President Ihsan Sabri Caglayangil, a Demirel loyalist.

Because of the deadlock, no legislation has been passed since last spring. This has prevented much-needed tax reforms, and has stalled any serious antiterrorist measures, including five that Ecevit and Demirel agreed on in principle earlier this month at the urging of the Army.

Demirel, meanwhile, is buoyed by the fact that Turkey's economic crisis has lessened slightly as a result of more than $3 million in foreign aid grants and debt resettlements received this year. Negotiations for most of these loans were begun under Ecevit, but Demerel is taking the credit for them, and is hoping that they will give him the final boost he needed at the polls to rule as he wants.