The president of Bangladesh, Zia Rahman, has been assassinated in the south-eastern city of Chittagong.
President Zia is believed to have died at 0430 local time when rebels stormed a government guest house.
He is reported to have been killed by sub-machine-gun bullets when he opened the door of his room to see what was happening outside.
Eight people are thought to have died in the shooting, including a security officer, an officer who was guarding the president and one of the attackers.
The killing was believed to be part of an army rebellion and government forces have taken control of the town after rebel leader Major General Manzur Ahmed fled.
One report on Bangladesh radio said Maj Gen Manzur was hiding in the hills outside Chittagong, while another report said he had been captured.
There are reports that Maj Gen Manzur staged a coup attempt partly because he resented a planned transfer to a non-command post in Dhaka.
Following the death of the 45-year-old president, the rebels announced they were forming a revolutionary committee but diplomats said they had failed to win support from army units across the rest of Bangladesh.
The army, under its chief of staff, Major General Hussain Muhammad Ershad, remained loyal to the Dhaka government and quickly put down the rebellion.
The Bangladesh government said the uprising in the port city had been carried out by a “few miscreants”.
In the capital Dhaka, tens of thousands of people have taken to the streets to show their grief at the death of their president, who was widely admired and respected.
Abdus Sattar, who has been named as acting president, has declared a state of emergency and a 40-day period of mourning. He also called on Maj Gen Manzur to surrender.
Dhaka airport is closed and all telephone and telex links to India have been suspended.
Army officers have been involved in several attempts to remove President Zia from office during his six-year rule.
Courtesy BBC News
In context
The president was assassinated by a small group of army officers. The killing was alleged to have been ordered by Major General Manzur.
Manzur was later reported to have been captured in a tea garden in Chittagong and killed by army officers.
A military court tried 31 officers in connection with an attempted coup and 12 were executed for complicity in the assassination of the president.
In 2000, a parliamentary committee in the capital Dhaka concluded that the trial of those accused of killing him was not conducted in accordance with the law.
The committee recommended that the families of the 12 army officials hanged for the murder should be compensated.
A member of the committee, a former army officer, told the BBC that the committee considered that the officers were sentenced to death without valid evidence in some cases and were the victims of injustice.