A state of high alert, often a simulated panic for comic effect.
The earliest citation of the term 'panic stations' that I can find in print comes from the New York newspaper The World, September 1892. The actual reference is to 'anti-panic stations', which were units set up by the local medical services in order to reassure the public during a cholera outbreak. However, that can't be said to be the origin of the term, as it has a different meaning to the one that we usually understand.
The real 'panic stations' is a rare linguistic beast, in that it is a nautical phrase that doesn't originate from the heydays of sail. One of the numerous meanings of the word station is 'a position assigned to a man on duty'. The Royal Navy had several commands to call sailors to their stations, notably 'action stations', which was ordered when a ship came under attack. Oddly, for a term that sounds like an ironic play on words, 'panic stations' was an actual command. This is apparent in a report titled Behind the Veil, published in The Times, November 1918:
Alarm gongs had already sent the guns' crews to their invisible guns and immediately after the explosion 'Panic stations' was ordered, followed in due course by 'Abandon ship'.
The above story itself relates to HMS Prize, one of the Q-ships that were used by the UK as a defence against the German U-boat submarines in World War I. Q-ships were heavily armed military vessels disguised as slow and rusting cargo ships, and were filled with wood and other buoyant cargo to enable them to stay afloat after being hit. The disguise was intended to induce the unsuspecting U-boat, assuming there to be no risk, to surface, at which point the Q-ship's hidden guns would be unveiled and an attack would commence. The Germans soon became suspicious of any apparently harmless ship and waited until all threat appeared to have gone before surfacing. The above story explains how, Lieutenant-Commander Sanders, the captain of the sham cargo vessel, even went to the lengths of allowing his ship to be hit and part-submerged before raising the flag and opening fire on the surfacing U-boat.
The Royal Navy's ships fly the White Ensign and the last-minute hoisting of the flag was considered to be a vital part of the engagement, as an attack by an unidentified vessel would have been against the accepted rules of war. Captain Saunders made sure that, although his ship was figuratively 'a wolf in sheep's clothing', it was literally 'showing its true colours'.
As to panic itself, the word is sometimes said to be derived from panicum, the Latin word for millet - which is also the source of the French 'pain' , i.e. bread. One of the theories as to the fate of the Mary Celeste, which was discovered abandoned in the Atlantic in 1872 with the crew mysteriously missing, is that the ship's bread was contaminated with the hallucinogenic ergot fungus, causing those on board to panic and throw themselves overboard. Neither of these suggestions is correct. The Mary Celeste ergot theory is based on no evidence and the word panic derives from the eccentric god Pan, who the ancient Greeks believed lived in caves and other lonely places. They attributed any unusual sounds or animal behaviour to him. In ancient Greece, anyone who exhibited any sudden state of wild alarm was said to be like Pan, or as we would say, 'Panic'.
See other Nautical Phrases.