Somalia's military government, which was forced to withdraw its forces from Ethiopia's southeastern Ogaden region last month, said it crushed an attempted military coup yesterday.

President Mohammed Siad Barre announced the abortive coup in a two-minute broadcast, as tanks remained in the streets and embassies and barracks were placed under heavy guard.A group of officers and troops was arrested.

The brief coup attempt was marked by shooting and explosions, but the president reassured Somalis that they "must be calm. There is no unrest now."

The extent of casualties was not immediately known, although there were early reports that a number of "senior officials" were killed.

Diplomatic sources in Nairobi, Kenya, said there had been strong resentment among army units which withdrew from the Ogaden after suffering major defeats at the hands of Cuban and Ethiopian troops.

Most of the dissidents were kept in northern Somalia, where they had crossed back from Ethiopia, the sources said. They indicated that the president apparently wanted to isolate the opposition away from the capital.

Siad Barre, who came to power after a bloodless coup in 1969, did not specify who he thought was responsible for the uprising, but he said "new imperialists" all along had wanted "to stir up chaos in the country."