40 How often they rebelled against him in the wilderness
and grieved him in the wasteland!
41 Again and again they put God to the test;
they vexed the Holy One of Israel.
42 They did not remember his power—
the day he redeemed them from the oppressor,
43 the day he displayed his signs in Egypt,
his wonders in the region of Zoan.
44 He turned their river into blood;
they could not drink from their streams.
45 He sent swarms of flies that devoured them,
and frogs that devastated them.
46 He gave their crops to the grasshopper,
their produce to the locust.
47 He destroyed their vines with hail
and their sycamore-figs with sleet.
48 He gave over their cattle to the hail,
their livestock to bolts of lightning.
49 He unleashed against them his hot anger,
his wrath, indignation and hostility—
a band of destroying angels.
50 He prepared a path for his anger;
he did not spare them from death
but gave them over to the plague.
51 He struck down all the firstborn of Egypt,
the firstfruits of manhood in the tents of Ham.
52 But he brought his people out like a flock;
he led them like sheep through the wilderness.
53 He guided them safely, so they were unafraid;
but the sea engulfed their enemies.
54 And so he brought them to the border of his holy land,
to the hill country his right hand had taken.
55 He drove out nations before them
and allotted their lands to them as an inheritance;
he settled the tribes of Israel in their homes.
56 But they put God to the test
and rebelled against the Most High;
they did not keep his statutes.
57 Like their ancestors they were disloyal and faithless,
as unreliable as a faulty bow.
58 They angered him with their high places;
they aroused his jealousy with their idols.
59 When God heard them, he was furious;
he rejected Israel completely.
60 He abandoned the tabernacle of Shiloh,
the tent he had set up among humans.
61 He sent the ark of his might into captivity,
his splendor into the hands of the enemy.
62 He gave his people over to the sword;
he was furious with his inheritance.
63 Fire consumed their young men,
and their young women had no wedding songs;
64 their priests were put to the sword,
and their widows could not weep.
65 Then the Lord awoke as from sleep,
as a warrior wakes from the stupor of wine.
66 He beat back his enemies;
he put them to everlasting shame.
67 Then he rejected the tents of Joseph,
he did not choose the tribe of Ephraim;
68 but he chose the tribe of Judah,
Mount Zion, which he loved.
69 He built his sanctuary like the heights,
like the earth that he established forever.
70 He chose David his servant
and took him from the sheep pens;
71 from tending the sheep he brought him
to be the shepherd of his people Jacob,
of Israel his inheritance.
72 And David shepherded them with integrity of heart;
with skillful hands he led them.