Updated

Gunmen shot dead a newspaper editor who was an outspoken critic of Islamists in Libya's volatile east on Monday, in a targeted killing that came hours after he warned the Islamist-led parliament of a civil war if it didn't bow to widespread demands to disband and allow early elections.

Libya is deeply polarized, with a renegade general having launched an armed campaign against Islamists, who dominate the elected parliament and who on Sunday approved a new prime minister days after thousands held demonstrations demanding the assembly halt sessions. The demonstrators also accused it of financing Islamist militias and acting as their political wing.

A security official said the 50-year-old Moftah Abu Zeid, chief editor of the Brnieq newspaper, was attacked while driving down a main street in the eastern city of Benghazi, cradle of the 2011 revolt that toppled and killed longtime ruler Moammar Gadhafi.

Over the last three years the city has seen near-daily attacks targeting security forces, activists, judges and moderate clerics.

The official, speaking on condition of anonymity because he was not authorized to talk to reporters, said the assailants fled the scene.

The paper posted pictures of the slain journalist's body on its Facebook page and an image of his silver car, with the driver's side window shattered. The daily al-Wasat quoted a medical official as saying that Abu Zeid was shot three times in the head and abdomen.

In an interview with the Libya al-Ahrar TV network broadcast late Sunday, Abu Zeid said that he had met with Gen. Khalifa Hifter, who is leading an offensive against Islamic militants in the city, and warned of a civil war if the parliament remained in place. Another paper, London-based al-Quds al-Arabi, had quoted him three days ago as saying that he received a warning to leave the country in 24 hours.

His newspaper last week carried a front-page picture of Hifter, and the editor, who was also a human rights activist, later said militiamen halted a shipment of the last issue on its way from Benghazi to the capital Tripoli.

Islamists have condemned the offensive launched earlier this month as a "coup," while several prominent government officials, diplomats and military units have rallied to Hifter's cause, hoping he can bring stability to the petroleum-rich North African country.

Hifter has said his campaign is aimed at imposing order and breaking the power of Islamists who lead the elected parliament, whom he accuses of opening the door to Islamic radicals.

The escalating conflict between Hifter's forces and the Islamists is the biggest challenge yet to the country's weak central government, which has struggled to rein in heavily-armed former rebel brigades turned militias.

On Sunday, the embattled parliament approved an Islamist-backed government headed by Ahmed Maiteg despite a boycott by non-Islamists and the threats from Hifter.

Nadia Rashed, an independent female lawmaker, said the new government was "illegitimate and unconstitutional" because it was approved without the minimum number of votes required.

Maiteg --who hails from the western city of Misrata and whose relatives command Islamist militias -- offered to include the interim prime minister, Abdullah al-Thinni, in his new line-up, but al-Thinni refused.

Al-Thinni was promoted from defense minister to interim prime minister after the Western-backed premier Ali Zidan was pushed out of office in a no-confidence vote in March.

Al-Thinni's interim government had demanded that parliament disband and hold early elections in order to defuse the tensions. Parliamentary elections are scheduled for next month, but it's not clear whether the vote can be held in the increasingly unstable country.

In a televised speech aired on Libya's state television channel, Maiteg said the people should hold tight to "legitimate institutions."

He said his government was committed to "building the state" and supporting the upcoming parliamentary elections, slated for June 25. He said his Cabinet, which is likely to be dissolved following the election of a new parliament, will have a comprehensive vision of solving problems "in this critical stage," starting with security.

"State sovereignty and dignity is our priority," he said.

Col. Mohammed Hegazi, Hifter's spokesman, meanwhile described the appointment of the new government as "a grave escalation" in a telephone interview with The Associated Press from Benghazi.

He warned that Hifter's forces would arrest the leaders of political blocs in parliament if and when they hold future meetings. He accused the parliament of speeding up the formation of the government only so it could pass a new budget to spend billions of dollars on the militias.

Lawmakers could not immediately be reached for comment. The government has long relied on a loose network of militias, many of which have tribal, regional or other loyalties.

Hegazi said Hifter's forces carried out some 17 airstrikes on the outskirts of Benghazi and arrested dozens of militants over the last 10 days, including Algerians, Yemenis and Egyptians.

"This is an open-ended operation and it will not stop until we get rid of all those takfiris," he said, using an Arabic word for Islamic extremists. He added that once Benghazi is under the full control of the security forces, the next operation would be in the Islamists' stronghold of Darnah to the east.