East Timor's President Xanana Gusmao has threatened to resign unless Prime Minister Mari Alkatiri steps down.
Mr Gusmao wants the prime minister to step down
The ultimatum follows Mr Gusmao's request for Mr Alkatiri to quit, saying he had lost confidence in him.
But Mr Alkatiri, who earlier met with ruling party officials to discuss his political future, appeared to have received the backing of his party.
The prime minister is unpopular amongst East Timorese, many of whom blame him for failing to stop recent violence.
Mr Alkatiri's decision to sack 600 soldiers in March sparked unrest which later turned into East Timor's worst violence since it voted for independence from Indonesia in 1999.
At least 21 people have died and thousands more have fled to refugee camps to escape the violence.
The BBC's Jonathan Head says rivalry between the two men has been simmering for years.
The president is a hugely important figure in East Timor, a charismatic former guerrilla commander who is admired and trusted throughout the country.
But the constitution gives the president little power, and the prime minister has a track record as a wily and tenacious politician who is not easily intimidated, our correspondent says.
Mr Gusmao said in a televised address on Thursday that the ruling party, Fretilin, had to make a decision.
"Fretilin has to choose, ask Mari Alkatiri to take responsibility for the major crisis, about the sacrifices of the state, the law and democracy," he said.
"Or, tomorrow, I will send a letter to parliament to inform them that I will resign from being president of the republic, because I am ashamed of all the bad things that have happened, on behalf of the state to its people," he said.
Rogerio Lobato faces charges over the allegations
On Tuesday, he told Mr Alkatiri he had lost confidence in him after watching an Australian documentary containing allegations against the prime minister.
Mr Alkatiri has been accused of recruiting a group of former fighters to act against his political opponents. He has repeatedly denied any involvement and prosecutors said on Wednesday there was no evidence linking him to the case.
But one of his former allies, former Interior Minister Rogerio Lobato, faces charges of conspiracy, arming civilians and attempted revolution in connection with the case.
Despite this, after emergency talks with ruling Fretilin party members, Mr Alkatiri appeared to have secured their support.
"Fretilin reaffirms Dr Mari Alkatiri as prime minister," the AP news agency quoted party spokesman Jose Reis as saying.
Mr Alkatiri himself told Lusa news agency in a telephone interview that he would not resign.
Mr Alkatiri has denied the allegations against him
Mr Gusmao said that if there was no progress by Friday morning, he would submit his resignation to parliament.
The president is a widely respected former guerrilla leader whose move to assume control of national security on 30 May was welcomed.
Mr Alkatiri, a veteran of East Timor's independence movement, spent the 24 years of Indonesian occupation in exile in Mozambique.
He is credited with skilfully negotiating with Australia over East Timor's rights to oilfields in the Timor Sea, but he is also viewed by many Timorese as a cold and arrogant politician.