The mess that was created in Libya, was UN endorsed.

And all these organisations like the ICC became very political during that conflict, which is why they have undermined their legitimacy in the eyes of neutral observers.