At least two people have been killed and scores wounded in a bombing at a mosque in Libya's eastern city of Benghazi, according to medical sources.

The casualties were caused by two suspected improvised explosive devices which went off at the Saad Ben Obadah mosque during Friday prayers.

Mutaz al-Mu'tri, Benghazi's security directorate spokesperson, said two bomb bags had been used in the attack, according to Libya's 218 tv news channel.

Medics told Reuters news agency that at least two people were killed and 55 were wounded. Local media news reports put the number of those injured at 129.

There was no immediate claim of responsibility.

3/1 Just In: Aftermath of the improvised explosive device blast at Saad Ben Obadah mosque in Majouri neighborhood of #Benghazi pic.twitter.com/SsUomOLOHn — The Libya Observer (@Lyobserver) February 9, 2018

The United Nations Support Mission in Libya (UNSMIL) was quick to condemn the attack, calling reports of civilian casualties "deeply disturbing".

"Direct or indiscriminate attacks agnst civilians are prohibited under international humanitarian law and constitute war crimes," UNSMIL said in a post on Twitter.

"This heinous act should not provide a justification for revenge attacks. Prompt, impartial investigations should bring perpetrators to justice."

This heinous act should not provide a justification for revenge attacks. Prompt, impartial investigations should bring perpetrators to justice #Benghazi #Libya — UNSMIL (@UNSMILibya) February 9, 2018

The incident comes weeks after a double car bombing in Benghazi killed at least 35 people.

That attack, which took place outside the Bait Radwan mosque on January 23, left more than 50 others wounded, including a number of senior security officials.

Ahmed al-Fituri, chief of a special investigation unit attached to the general command of east Libyan security forces, was among the casualties.

Forces loyal to Khalifa Haftar, a renegade general based in the east of the country, took control of Benghazi in 2017, after a three-year campaign against rival armed groups.

The battles have left large swaths of the port city in ruins.

Several bombings during the latter stages of the conflict targeted figures linked to Haftar's self-styled Libyan National Army (LNA).

The LNA claimed victory in Benghazi in July of last year, but sporadic clashes dragged on until December when it took control of its rivals' final holdout.

It has since imposed strict military control on the city and other parts of eastern Libya under its control.

The fighting in Benghazi was part of a broader conflict that developed in Libya after former ruler Muammar Gaddafi was removed from power and killed in a NATO-backed uprising in 2011.

The North African nation has had competing governments aligned with rival military factions based in Tripoli and the east since 2014.