Bruce makes an important point. It is important that you know the phone number and address of the port/ship's agent. It is posted in the daily newsletter/planner and you should take this information ashore with you.
This contact information is as, or more, important as taking a photocopy of your passport. This is the person to contact if you can't get back to the ship.
Local police "probably" know who to contact but it's going to add even more time to the process.
I know two people that lost their passports in Cozumel while they were staying at an AI. They had them in a backpack and left the backpack at a bar.
They admit it was pure stupidity to take the passports with them but "thought" they may need them for ID when they rented a jeep.
They were able to obtain a "temporary travel authorization" (I don't know the official name) from the U.S. Consulate. It was all done via phone and the local authorities. They did not have to go to the U.S. Consulate on the mainland. However, they had to "extend" their vacation by three days before they could go home. At least they did have insurance that did cover the costs of the extension and the passport replacement. It took six months to get the money but they got it.