2 Samuel 23:14

And David was then in an hold, and the garrison of the Philistines was then in Beth-lehem.

David was then in a stronghold while the Philistine garrison occupied Bethlehem. The well near Bethlehem therefore lay behind the Philistine guard. Remembering his boyhood, he longed for water from that well.

Three of his men risked their lives to fetch the water and bring it to him. He regarded the peril they had faced as too sacred to treat lightly, so instead of drinking the water he poured it out as an offering to God.