It is international law, in peacetime and in war times, to rescue people at sea.
This is usually done by the country closest to the distressed vessel.
We spent days (and thousands of dollars) searching for sole UK sailor Tony Bullimore who decided to sail the wild Southern Ocean and capsized. Lucky for him, he was found.
link
"The duty to rescue persons in distress at sea is a fundamental rule of international law. It has been incorporated in international treaties and forms the content of a norm of customary international law."
The duty to rescue persons in distress at sea is a fundamental rule of international law. It has been incorporated in international treaties and forms the content of a norm of customary international law. It applies both during peacetime and during wartime, albeit with the necessary adjustments...
international-review.icrc.org