CAIRO — The government of Libya said Monday that it had lost control of its ministries to a coalition of militias that had taken over the capital, Tripoli, in another milestone in the disintegration of the state.

“The government reiterates that these buildings and the public headquarters are not safe and inaccessible, because they are under the control of armed men,” the government said in a statement. It was issued from the eastern city of Tobruk, where the recently elected Parliament has convened in territory controlled by a renegade general who has tried to stage a coup d’état.

The statement indicated the emergence of two rival centers of government — one in Tripoli and the other in Tobruk — each all but powerless.

Over the last two months, the fractious militias that have dominated the country since the ouster of Col. Muammar el-Qaddafi three years ago — variously local, tribal, regional, Islamist or criminal — have lined up into two warring factions. One side, operating under the name Libya Dawn, aligned with militias from the coastal city of Misurata and the Islamist factions in what fighters portrayed as a battle to prevent a counterrevolution. The other side was aligned with the renegade general, Khalifa Hifter, in the east and partisans from the mountain city of Zintan in the west, to fight what they called a battle against Islamist extremists.