The story behind the word shibboleth is recorded in the biblical Book of Judges. The word in ancient Hebrew dialects meant ‘ear of grain’ (or, some say, ‘stream’). Some groups pronounced it with a sh sound, but speakers of related dialects pronounced it with an s.
In the story, two Semitic tribes, the Ephraimites and the Gileadites, have a great battle. The Gileadites defeat the Ephraimites, and set up a blockade across the Jordan River to catch the fleeing Ephraimites who were trying to get back to their territory. The sentries asked each person who wanted to cross the river to say the word shibboleth. The Ephraimites, who had no sh sound in their language, pronounced the word with an s and were thereby unmasked as the enemy and slaughtered.
Here is the relevant excerpt from the Book of Judges. The full account is in Chapter 12, verses 1-15.
[Judges 12:5-6] 5 And the Gileadites took the passages of Jordan before the Ephraimites: and it was so, that when those Ephraimites which were escaped said, Let me go over; that the men of Gilead said unto him, Art thou an Ephraimite? If he said, Nay;
6 Then said they unto him, Say now Shibboleth: and he said Sibboleth: for he could not frame to pronounce it right.
