According to what? Laws can be whatever a country says, so long as they have the mechanism to enforce it.
See: the US using special forces to kidnap Maduro
That was very clearly illegal and has nothing to do with laws.