After a day's march they found themselves in the neighborhood of Gath, at the place where the shepherds employed by the residents of the city gathered with the flocks. The Ephraimites asked them to sell them some sheep, which they expected to slaughter in order to satisfy their hunger with them, but the shepherds refused to have business dealings with them, saying, "Are the sheep ours, or does the cattle belong to us, that we could part with them for money?"

Seeing that they could not gain their point by kindness, the Ephraimites used force. The outcries of the shepherds brought the people of Gath to their aid. A violent encounter, lasting a whole day, took place between the Israelites and the Philistines. The people of Gath realized that alone they would not be able to offer successful resistance to the Ephraimites, and they summoned the people of the other Philistine cities to join them.

The following day an army of forty thousand stood ready to oppose the Ephraimites. Reduced in strength, as they were, by their three days' fast, they were exterminated root and branch. Only ten of them escaped with their bare life, and returned to Egypt, to bring Ephraim word of the disaster that had overtaken his posterity, and he mourned many days.