TRIPOLI (Reuters) - Libya should hold parliamentary and presidential elections by year end, the internationally recognized Prime Minister Fayez al-Serraj said on Tuesday.

The United Nations had planned for the North African oil producer to hold elections on Dec. 10 as a way out of conflict since the toppling of late leader Muammar Gaddafi but a spike in violence and lack of understanding between its rival camps had made this impossible.

Libya is divided into a recognized government in Tripoli and a parallel version in the east backed by Khalifa Haftar, whose forces control the east.

Last week, Serraj met with Haftar in Abu Dhabi but few details had emerged so far. He said in a speech in Tripoli he had agreed with Haftar to hold elections by year end.

He said he had met Haftar “in order to stop bloodshed, reach a formula of avoiding our country’s conflict and military escalation.”

Serraj did not elaborate.

Haftar’s forces, the Libya National Army, have expanded south since January, securing key oilfields. There has been talk they might move north to take the capital in western Libya.