East Timor's President Jose Ramos-Horta is in a critical condition and has been put into an induced coma, after being shot by rebel soldiers.
Mr Ramos-Horta was shot in a pre-dawn attack on his Dili home, and later airlifted to Australia for treatment.
Later Prime Minister Xanana Gusmao declared a 48-hour state of emergency, including a night-time curfew.
Mr Gusmao, who was targeted in a separate incident but was unharmed, described the events as a coup attempt.
Rebel leader Alfredo Reinado and another rebel died in the attack on Mr Ramos-Horta.
Australian PM Kevin Rudd pledged to send more peacekeepers to East Timor.
He said the "attempt to assassinate the democratically elected leadership of a close friend and neighbour of Australia's is a deeply disturbing development".
The attack on Mr Ramos-Horta happened at about 0700 on Monday (2200 GMT Sunday).
Two cars drove past the president's house on the outskirts of the capital, Dili.
He was outside the compound at the time. He apparently tried to return home after hearing gunshots but was shot on the way in, according to UN officials.
One soldier was also reported to be seriously wounded.
Mr Ramos-Horta was taken to a hospital run by the Australian military in Dili, where he was stabilised.
He was later evacuated to Darwin for further treatment, and put in intensive care on a ventilator.
He received three gunshot wounds - one in the stomach and two in the chest - and his condition is described as "serious but stable".
But the Darwin hospital's general manager told AFP news agency he was hopeful for a full recovery.
"The fact that he is in a stable condition is a good sign that we should see some reasonable outcomes for him," Dr Len Notaras said.
"He's not fighting for his life but his injuries are extremely serious."
Shots were also fired at Mr Gusmao's convoy, shortly after the attack on Mr Ramos-Horta, but no-one was hurt.
The attack happened after the prime minister had left his house. The vehicles came under heavy fire, and one reportedly left the road and rolled over.
Mr Gusmao told a press briefing that the situation was under control.
"I consider this incident a coup attempt against the state by Reinado and it failed," he said.
"This government will guarantee security and development will continue."
He later announced a state of emergency, including a curfew between 2000 and 0600 and a ban on gatherings and protests.
Dili is reported to be quiet and heavily patrolled by local and international security forces.
But the BBC's Andrew Harding says officials are concerned that there could be fighting between rival groups.
An Australian-led UN force has been in charge of security in the capital since mid-2006.
Peacekeepers were invited into the country to quell violent clashes between police and the military, triggered by then Prime Minister Mari Alkatiri's decision to sack a third of the armed forces.
Peacekeepers have stepped up security in Dili
At least 37 people were killed in several weeks of fighting and more than 150,000 were forced to flee their homes.
Reinado, a former naval commander, was accused of being involved in several shooting incidents during the violence and charged with murder.
But he escaped from jail and, with a group of followers, holed himself up in the mountains, refusing government pleas to surrender.
His continued stand-off with the government had led to fears of renewed violence in what is one of the world's newest and poorest nations.
Mr Ramos-Horta is a political veteran.
He spent 24 years in exile after Indonesian troops invaded East Timor in 1975, leading the country's bid for independence from overseas and winning the Nobel Peace Prize for his efforts.
He served in the more powerful role of prime minister in the wake of the 2006 violence, before elections last year which saw him switch roles with then President Xanana Gusmao.
East Timor gained independence in 2002.