What country did Panama belong to before its independence?

What country did Panama belong to before its independence?