Genesis 21:31-34 The Message (MSG)
31-32 That’s how the place got named Beersheba (the Oath-Well), because the two of them swore a covenant oath there. After they had made the covenant at Beersheba, Abimelech and his commander, Phicol, left and went back to Philistine territory.
33-34 Abraham planted a tamarisk tree in Beersheba and worshiped God there, praying to the Eternal God. Abraham lived in Philistine country for a long time.