The Egyptian Embassy in Bangladesh closed its consular section until the end of the month on Wednesday after receiving a bomb threat in protest against the killing of supporters of the Muslim Brotherhood in Cairo, police and embassy officials said.
Rafiqul Islam, a senior police official in Dhaka's diplomatic zone, said security had also been stepped up outside the embassy.
"Stop genocide on Brotherhood and supporters of Morsy otherwise, on behalf of Bangladesh, I warn you that something wrong will happen," Rafiqul quoted the letter as saying.
"The embassy will be blown up as happened in Libya and it [the embassy] will come under gun attack like Pakistan if atrocities on the Brotherhood and Morsy's supporters are not stopped."
Egypt is enduring the bloodiest internal conflict in its modern history, with about 900 people, including 100 police and soldiers, killed after security forces broke up protests in support of overthrown President Mohamed Morsy in the capital on 14 August.
A spokesman for a pro-Brotherhood alliance put the death toll among its followers at about 1,400.
Militants killed 15 people when they drove two bombs into the Egyptian Embassy in the Pakistani capital in 1995. A bomb ripped through the garden wall of the Egyptian consulate in the eastern Libyan city of Benghazi on Saturday.
It was not immediately clear who was behind Wednesday's threat. Muslim Bangladesh is home to several outlawed Islamist groups but there have been no known threats against Egyptian interests in the past.
Rafiqul said the threat letter was sent by mail from Farmgate, a busy area of the city, and provided a cell phone number.
"Our Special Branch is trying to identify the owner of the cell phone," he said.