TRIPOLI, Libya — Forces apparently loyal to a renegade Libyan general said they suspended Parliament Sunday after earlier leading a military assault against lawmakers, directly challenging the legitimacy of the country’s weak central government three years after the overthrow of dictator Moammar Khadafy.
A commander in the military police in Libya read a statement announcing the suspension on behalf of a group led by General Khalifa Hifter, a one-time rebel commander who said the United States backed his efforts to topple Khadafy in the 1990s.
Hours earlier, militia members backed by truck-mounted antiaircraft guns, mortars, and rocket fire attacked Parliament, sending lawmakers fleeing for their lives as gunmen ransacked the legislature.
General Mokhtar Farnana, speaking on Libyan television on behalf of Hifter’s group, said it assigned a 60-member constituent’s assembly to take over for Parliament. Farnana, without elaborating, said Libya’s current government would act on an emergency basis.
Farnana, who is in charge of prisons operated by the military police, said forces loyal to Hifter carried out Sunday’s attack on Parliament. He also said the action was not a coup but ‘‘fighting by the people’s choice.’’
‘‘We announce to the world that the country can’t be a breeding ground or an incubator for terrorism,’’ said Farnana, who wore a military uniform and stood in front of Libya’s flag.
Early Monday morning, Libya’s interim government condemned the attack on Parliament and said it would ignore the declaration by the general’s group.
‘‘The government condemns the expression of political opinion through the use of armed force,’’ Libyan Justice Minister Salah al-Marghani said in a statement. ‘‘It calls for an immediate end of the use of military arsenal . . . and calls on all sides to resort to dialogue and reconciliation.’’
Militias that backed the country’s interim government guarded checkpoints around the capital late Sunday. Hifter’s forces in Tripoli appeared concentrated around the road to the city’s airport and its southern outskirts.
The attack on Parliament, in which two people were killed and more than 60 wounded according to hospital officials, came after an assault Friday by Hifter’s forces on Islamist militias in the restive eastern city of Benghazi. Authorities said 70 people were killed in that attack. On Sunday, gunmen targeted the Islamist lawmakers and officials Hifter blames for allowing extremists to hold the country ransom, his spokesman Mohammed al-Hegazi told the Arabic newspaper al-Ahrar.
‘‘This Parliament is what supports these extremist Islamist entities,’’ Hegazi said. ‘‘The aim was to arrest these Islamist bodies who wear the cloak of politics.’’
The fighting spread to the capital’s southern edge Sunday night and along the airport highway.
Libya’s army and police rely on the country’s myriad of militias, the heavily armed groups formed around ethnic identity, hometowns, and religion that formed out of the rebel factions that toppled Khadafy.
Bringing them under control has been one of the greatest challenges for Libya’s successive interim governments, one they largely failed at as militias have seized oil terminals and even kidnapped a former prime minister.