At least 21 people have been killed in fighting near Libya's capital Tripoli, military sources say, as the country's rival parliaments meet in Morocco for UN-brokered peace talks.

Forces of the UN-recognised government, based in the eastern city of Tobruk, clashed with fighters from the Libya Dawn alliance on Friday in Tajoura, 30km east of Tripoli, after launching an attack in a new bid to take back the capital, which is under the militia's control.

A pro-government military source told the AFP news agency "14 soldiers, four fighters from Fajr Libya [Libya Dawn], and three women were killed today in Tajoura", adding that the women were killed accidentally in rocket fire.

Another 24 people were wounded, he said, without giving a breakdown.

Mohamad Shami, a Libya Dawn spokesperson in Tripoli, confirmed the attack but gave a much higher death toll on the pro-government side.

He said "32 members of the attacking forces were killed".

"Fajr Libya is in full control of Tajoura, and there are minor clashes near a camp called the 101 camp where some of the attackers are still there and Fajr Libya forces are surrounding them," he said.

A second pro-government military source told AFP that "there are ongoing fierce battles in Tajoura area, with the help of our air force launching air strikes".

 INSIDE STORY: Are more arms the answer for Libya?

The fresh fighting marks a new front as forces loyal to the internationally recognised government try to re-enter the capital, under the control of Libya Dawh since August.

The country has had two governments and parliaments since the alliance of fighters seized Tripoli in August and the internationally recognised government fled to the country's far east.

On March 24, the UN mission in Libya (UNSMIL) unveiled a six-point plan to end the crisis, including the formation of a transitional unity government until a new constitution is adopted and elections held.

The rival parliaments are currently in Morocco to try to reach an agreement.

UNSMIL said Friday that there were still "differences" that needed to be worked out before a consensus was reached.

"We have received the text from the parties on their remarks. There are differences that we are working to narrow," Samir Ghattas, UNSMIL spokesman, said in statement texted to AFP.

Libya has been politically divided since a 2011 revolt that toppled long-time ruler Muammar Gaddafi.

Armed groups have filled the vacuum as they battle for control of the country's oil wealth and cities.

Source: Al Jazeera and agencies