Article 28: Civil jurisdiction in relation to foreign ships

1. The coastal State should not stop or divert a foreign ship passing
through the territorial sea for the purpose of exercising civil jurisdiction in relation to a person on board the ship.
2. The coastal State may not levy execution against or arrest the ship
for the purpose of any civil proceedings, save only in respect of obligations or liabilities assumed or incurred by the ship itself in the course or for the purpose of its voyage through the waters of the coastal State.
3. Paragraph 2 is without prejudice to the right of the coastal State, in
accordance with its laws, to levy execution against or to arrest, for the
purpose of any civil proceedings, a foreign ship lying in the territorial sea, or passing through the territorial sea after leaving internal waters.
Source: UNCLOS