Psalms 78:51

And smote all the firstborn in Egypt; the chief of their strength in the tabernacles of Ham:

Psalm 78:51 belongs to a psalm that recounts the rich blessings God gave to Israel, His people. Those blessings include His judgment on Egypt in which He struck down the firstborn.

The same psalm sets those blessings against Israel's poor response to those benefits, showing that the children of Israel worked constantly against a good God. Through disobedience they were brought into the condition that was the sure result of their own course of action. Under rebuke and chastisement they repented, but under temptation, self-indulgence, and self-gratification they fell again.