In the Old Testament we find the story (Judges 12:1-6) of a battle between the Gileadites and the Ammonite.The Gileadites win, but the Ephraimites, from the east side of the Jordan River, are upset that the Gileadites never invited them to be part of the war and so they invade Gileadite territory. The Gileadites win that war also and then to make sure none of the invading army escapes back to Ephraim they set guards at the passage over the Jordan river that leads back to Ephraim.
To get home the Ephraimite men pretend to be Gileadites so they can cross the Jordan. However, the Gileadite soldiers are wise. They stop everyone trying to cross the river and ask, “Are you an Ephraimite?” If the man answers no, the interrogator asks, “Then say Shibboleth.”
This was a clever test because the Ephraimites could not pronounce the “sh” sound and would reply, “Sibboleth,” at which point they were discovered and executed. We are told that 42,000 men lost their lives because they could not say shibboleth.