Protocol Peril

When visiting alien or foreign cultures, some amount of Culture Clash is inevitable. In fiction, writers are able to take this to almost ridiculous extremes and milk the resulting dramatic tension.

Here's the basic formula: take a society. Give them, as one of their hats, a rigid and/or complex code of manners or tradition they adhere to. Make the consequence of breaking that code dire: death, slavery, imprisonment, declaration of war, loss of a desperately needed supply or alliance they have. Insert the protagonists, usually well meaning but likely to have difficulty complying. If they can get away with asking why the punishment is so severe, the response will often be "What Do You Mean It's Not Heinous?" Or if the custom is particularly lacking in good sense from the outside point of view, well, "Nobody Ever Complained Before." Shake well and watch your protagonists squirm.

If the members of the culture in question are hip to the fact that outsiders are prone to stumbling on the rules, they may be nice enough to give a warning or two before bringing the hammer down. Probable good ending: both cultures learn to understand each other better and An Aesop is learned about respecting other's differences. Probable bad ending: the crew has to rescue one of their own and make a break for it with the angry mob on their heels.

A Sub-Trope of Culture Clash. Super-Trope to Fumbling the Gauntlet, where the character's innocent action is taken as a challenge to fight. See also: Planet of Hats, Sacred Hospitality. Likely to involve invoking the Alien Non-Interference Clause.

Literature

 * The Cascadians of Vatta's War put a huge emphasis on politeness over much else and the list of things that are considered impolite is vast. Visitors to the spaceport are given a sizable booklet explaining the rules and expected to learn them. The third book has Cpt. Kylara Vatta in a courtroom defending her identity against another Vatta starship captain claiming she is an imposter; being found in contempt of court is an offense that carries the death penalty.
 * Arabian Nights: In Arabian cultures it is taboo to eat with your left hand; one man who tries it gets it cut off by his dinner guest. In another tale this becomes an issue for a man who lost his right hand...
 * The Retrieval Artist series by Kristine Kathryn Rusch has the Earth Sphere Alliance bound by treaties with their alien trading partners to honor their laws and extradite people who break them, with judgements handed down by a Multicultural Tribunal. Many of the alien crimes, punishable by death or Fate Worse Than Death, are acts that would be completely innocent in the eyes of humans - say, stepping on the wrong sort of plant. This is why there are agencies to Disappear people who run afoul of them, trackers that hunt them for the law and retrieval artists working outside the law who may bring them back for other reasons.
 * Isaac Asimov's short story Strikebreaker features a little colony in an asteroid. Being so small everything must be recycled, even water, from feces. Naturally someone has to do the job and the asteroid's inhabitants try to make him as comfortable as possible. However, it's stigmatized by everybody, who due to social prejudice avoid interacting with him and feel physical disgust by him. The trouble appears when an outsider arrives at the colony to make social studies.

Live Action TV

 * Star Trek thrives on this trope:
 * In The Next Generation 1st season episode "Justice", the crew beams down onto a seemingly pleasurable planet inhabited by the friendly Edo, where it is explained that no one breaks the rules because of random inspections and only one punishment: execution. Then Wesley, who was playing with other kids, accidentally breaks a greenhouse window and it just so happens that's where the moderators check at that moment...
 * "The Big Goodbye" has Picard practicing the language of an alien race on the holodeck to prepare for upcoming delegations, because the slightest mispronunciation will be taken as a grave offense.
 * There's an episode of Star Trek: Voyager where B'Elanna (part Klingon) gets arrested for having violent thoughts on a planet of telepaths.
 * Janeway once nearly ruined relations with a species called the Tak Tak. Apparently to them, putting one's hands on one's hips is the greatest insult possible.
 * Well, body language is a major part of their language. We can get by without it, but they can't.
 * The crew of Enterprise once managed to anger alien dignitaries by having a dinner in their honor. This was highly offensive to the visitors (whose hat was already "easily offended") because on their planet you eat alone. "You eat like you mate!"
 * In Stargate SG-1, Vala was burned alive on an Ori planet for swearing.
 * Well, that was only after they realised she had no idea how to perform the daily religious ceremony that the person she was currently inhabiting should have known. They took it as a refusal and thus branded her as a heretic.

Tabletop RPG

 * The Traveller Adventure, segment "Pysadian Escapade". While their PC's are on the planet Pysadi, the players are railroaded by the referee into having the PC's take on a group of anolas (alien animals) as pets. When the Pysadians find out about this violation of their religious laws, they imprison one of the PC's as a companion for the anolas and expel the other PC's from the planet.

Webcomics

 * A Magical Roommate has an off-screen moment where Kuralla visits one of the fairy lands and accidentally performs the wrong bow. The king makes her and Sages leave in exchange for him doing nothing else.
 * Homestuck has the trolls who, due to differences in reproduction, results in buckets in the troll world being viewed the same way that pornography would be viewed by an individual from our world. Therefore, Hilarity Ensues whenever buckets come into play.

Video Games

 * This trope was the cause of the Terran-Vasudan War in Free Space.
 * For clarification, the Vasudan language is ridiculously complex and changes depending on things like your relative status to the other person, the time of day, your spacial position relative to the Emperor, etc. The translator (no word on whether said translator was human, Vasudan, or machine) screwed up somewhere during first contact and it all went south from there.
 * Subverted in Star Control II where it was previously thought that the war with the VUX was the result of the captain of the First Contact ship calling the VUX captain ugly. Turns out, they are the ones who think we're too ugly to be left alive and simply used the accidental insult as a pretext.

Real Life

 * When the explorer Vasco da Gama came round Africa for a First Contact with the Indian Grand Mogul, his ships were loaded with beads for trade and diplomatic presents because that was sufficient for the low tech cultures along the way. Unfortunately the Grand Mogul had a technology base about equal to Europe and ruled one of the richest parts of the world. Naturally he wasn't pleased at having beads as a gift.

Western Animation

 * One episode of Futurama featured native Martians as Native American stereotypes. There was a misunderstanding, but it would all be OK if Kif didn't cough while smoking the peace pipe. He did. The punishment was death.