The next oracle (Jeremiah 47:1–7) is against the Philistines. The Philistines were in a region along the southern coastal plain of Palestine with five major cities: Ashkelon, Gaza, Ashdod, Gath, and Ekron. In 620 BC, the Assyrians withdrew from the area and the Philistines experienced a period of independence before an Egyptian invasion in 601 BC brought them under Egyptian control for a brief period.1
It is probably this Egyptian invasion that is referred to in the heading for the oracle, The word of the Lord that came to Jeremiah the prophet concerning the Philistines, before Pharoah struck down Gaza.
This gives the date for the oracle, but the Egyptian invasion itself is not part of the oracle.2 It seems the oracle was given just before Pharoah struck Gaza.3 The oracle itself looks forward to an invasion that will come out of the north.
Babylon is not named but certainly seems to be the enemy that will rise up against the Philistines. The prophecy was fulfilled in 604 BC when Babylon, after defeating Egypt at Carchemish, moved southward and took the city of Ashkelon.4
1 The word of the LORD that came to Jeremiah the prophet concerning the Philistines, before Pharaoh struck down Gaza.