Throughout a week of violence and destruction in East Timor and the imposition of martial law, Indonesians and foreign analysts have been stumped by the same basic question: Who is in charge here?

B.J. Habibie remains Indonesia's president, but as the crisis has dragged on, much of his power seems to have drained into the hands of his military chief, Gen. Wiranto. Today, it remained unclear who was calling the shots on East Timor and who foreign leaders should be dealing with to press their demand for outside peacekeepers in the violence-wracked territory.

Speculation about a shifting power relationship between the president and his army commander was heightened in a telling vignette from this morning's local newspapers. After a three-hour meeting Wednesday at the presidential palace, Wiranto emerged to dismiss talk of a coup that had swept Jakarta. He spoke to reporters while leaning casually back on Habibie's official limousine--and he did not move even when a palace aide emerged to say the president was about to leave.

The episode--with Wiranto leaving the palace to deny reports of Habibie's resignation--was "a sign that he [Habibie] is basically very weakened," said Marzuki Darusman, chairman of the National Human Rights Commission and a deputy leader of Habibie's ruling Golkar party.

At best, the unpopular Habibie was considered a lame duck whose tenure would last only until the People's Consultative Assembly convenes next month to select a new president. But after the debacle in East Timor--a hastily arranged referendum on independence that the government lost, followed by a rampage by soldiers, policemen and their militia proxies--many are questioning whether Habibie can last even another month.

In Jakarta today, rumors continued that a "silent coup" may already have taken place. There "is speculation that Wiranto might be in the process of edging out Habibie," said Wimar Witoelar, a political commentator and talk show host. "Habibie is not too willing to assert himself anymore. If that means yielding to Wiranto, he might be ready for some kind of deal."

"I think Wiranto is probably 50 percent in charge of everything now," Marzuki said. "Habibie is basically still giving out instructions, but it doesn't matter; if it contradicts army policy, that's the end of the matter."

The talk of Wiranto's staging a quiet coup was so widespread today that it sent the Indonesian currency and stock markets tumbling and put presidential advisers in the odd position of issuing public denials that Habibie had already resigned and fled the country.

"Regarding the coup, I think that is just talk," said Habibie's top economic minister, Ginandjar Kartasasmita, who is attending a regional economic meeting in Auckland, New Zealand. "There is no base to that."

The coup rumors are "obviously a systematic campaign to undermine Habibie and show that Indonesians are not ready for democracy," said Habibie's foreign policy adviser and spokeswoman, Dewi Fortuna Anwar.

"It would have been easier for President Habibie if the autonomy option had won," she said, referring to the alternate choice on the East Timor referendum, which would have kept the territory as a province of Indonesia with wide home-rule powers. But the Aug. 30 vote set East Timor on an independence path, she said, and Habibie's "political opponents are using this to attack him."

Habibie, a German-trained aeronautical engineer, ascended to the presidency after his mentor, president Suharto, resigned suddenly in May 1998, but his relationship with the military has always been rocky.

Habibie, Indonesia's first civilian president, never served in uniform. And as technology minister under Suharto, he angered the military by using his proximity to the president to force them to buy equipment and spare parts from 10 state-subsidized strategic industries that Habibie controlled.

His Golkar party, now badly fragmented, finished a distant second in parliamentary elections in June after naming Habibie its presidential candidate. This led the party's reform wing, headed by Marzuki, to search for a new standard-bearer. But Habibie was hoping to cobble together a parliamentary coalition that would elect him president. This, analysts said, he hoped to do by aligning his Golkar supporters with smaller Islamic parties, provincial representatives and the 38 seats reserved for the armed forces under Indonesia's new election rules. In a bid to woo the military to back Habibie's bid to retain power, Golkar offered the vice presidency to Wiranto.

But the East Timor disaster--with the military blaming Habibie for calling the independence vote--has seriously damaged his political plans, analysts here say. Coupled with that, a burgeoning corruption scandal, involving a questionable commission paid by a financially ailing bank, now seems to have all but ended Habibie's chances to hold on to his job.

"Habibie is severely weakened, because now on top of the traditional areas of criticism, he has to deal with discontent from the military and the nationalists," said political commentator Witoelar. "He has an even more narrow support base."

Marzuki suggested that the "dump Habibie" movement might intensify. "What we're trying to do is find him an exit strategy," he said. But Witoelar cautioned that Habibie has survived before when others have counted him out. "He's like an object that doesn't sink," he said. "He just keeps bobbing up."