The heading says it is the word of the Lord to Jeremiah concerning the Philistines, before Pharaoh struck down Gaza. The text does not specify which pharaoh or what moment is meant, so scholars debate the exact historical setting.
The Lord announces that waters are rising from the north and becoming an overflowing torrent: they flood the land and everything in it, the cities and their inhabitants. People cry out and every inhabitant of the land wails. At the noise of the stamping of the horses' hooves, the rumbling of chariots and the clatter of wheels, fathers do not turn back to their children, because their hands have grown weak.
It is the day to destroy all the Philistines and to cut off from Tyre and Sidon every helper that remains. The Lord will destroy the Philistines, the remnant of the coastland of Caphtor. Gaza will shave her head in mourning, and Ashkelon will be silenced, along with the rest of her valley. The prophet asks how long they will gash themselves.
Then the prophet addresses the sword of the Lord and asks when it will rest: let it go back into its scabbard, be still and quiet. The answer is that it cannot rest, because the Lord has given it a command, and has directed it against Ashkelon and the seacoast.