Compelled by duty.
The captain was dutybound to see all passengers off the sinking ship before he left it himself.