Updated

The U.N. has appointed German diplomat Martin Kobler to be its envoy to Libya after months of failed peace negotiations between the country's two rival governments.

A statement issued Wednesday said Kobler had been selected to replace Spanish diplomat Bernardino Leon, without providing further details. As recently as last week, U.N. officials had expressed confidence in Leon and dismissed media reports that he was on his way out.

Libya was plunged into turmoil following the 2011 toppling and killing of longtime dictator Moammar Gadhafi. An internationally recognized government is based in the far eastern city of Tobruk, while an Islamist militia-backed government controls the capital, Tripoli.

Last month, the Tobruk government rejected a power-sharing arrangement proposed by Leon. Both sides had expressed criticism of his handling of the negotiations.