The U.N. Security Council is urging rival leaders in Libya to engage in talks and put an end to the country's political crisis.

In a statement, council members also condemned violence in the north African country and said there can be no military solution.

The statement followed a briefing Wednesday by U.N. envoy for Libya Ghassan Salame who stressed that "the political process must progress, as the status quo is untenable."

Salame said there is "reason for optimism" in the political process, but also cause for concern.

He pointed to continued violence, localized conflicts and the presence of extremists including the Islamic State group and al-Qaida in Libya.

Libya plunged into chaos following a 2011 uprising that toppled longtime dictator Moammar Gadhafi.