Seven people were taken off a marine research boat in the Firth of Clyde after the crew found an unexploded mine from World War Two.
The discovery was made at about 11:20 as the vessel carried out a routine survey around the west coast.
The Scottish government said Marine Scotland's emergency response was activated and the mine was removed by a bomb disposal team.
A spokeswoman said Troon lifeboat took "non-essential personnel" to safety.
Rothesay Coastguard Rescue Team was also involved in the response.
The mine is understood to have been discovered near Wemyss Bay.
The Scottish government spokeswoman said: "Marine Scotland's emergency response was activated and the vessel worked with HM Coastguard and bomb disposal experts to contain the incident and safely remove the mine.
"The safety of our staff and crew remained of paramount importance as we worked with the Maritime and Coastguard Agency to co-ordinate the emergency response.
"At all times the incident was handled in order to minimise the risk to the public. As a precaution non-essential personnel were safety disembarked from the vessel via the Troon lifeboat this afternoon."