2 Samuel 24:17

17 When David saw the angel who was striking down the people, he said to the LORD, “I have sinned; I, the shepherd,a have done wrong. These are but sheep. What have they done? Let your hand fall on me and my family.”

Read 2 Samuel 24:17 Using Other Translations

And David spake unto the LORD when he saw the angel that smote the people, and said, Lo, I have sinned, and I have done wickedly: but these sheep, what have they done? let thine hand, I pray thee, be against me, and against my father's house.
Then David spoke to the LORD when he saw the angel who was striking the people, and said, "Behold, I have sinned, and I have done wickedly. But these sheep, what have they done? Please let your hand be against me and against my father's house."
When David saw the angel, he said to the LORD, “I am the one who has sinned and done wrong! But these people are as innocent as sheep—what have they done? Let your anger fall against me and my family.”

What does 2 Samuel 24:17 mean?

John Gill's Exposition of the Bible
2 Samuel 24:17

And David spake unto the Lord
In prayer; he and the elders of Israel being clothed in sackcloth, and fallen on their faces, he prayed, not unto the angel, but to Jehovah that sent him; see ( 1 Chronicles 21:16 1 Chronicles 21:17 ) ;

when he saw the angel that smote the people;
in the air over Jerusalem, with a drawn sword in his hand, which made him appear terrible:

and said, lo, I have sinned, and I have done wickedly;
in numbering the people:

but these sheep, what have they done?
he looked upon himself as the only transgressor, and his people as innocent, and as harmless as sheep; he thought of no sins but his own; these were uppermost in his mind, and lay heavy on his conscience; and it grieved him extremely the his people should suffer on his account: but they were not so innocent as he thought and suggests; and it was not only for his, but their sins, this evil came; he was suffered to do what he did, to bring upon them deserved punishment for their rebellion against him, and other sins; however, this shows the high opinion he had of them, the great affection he had for them, and his sympathy with them in this time of distress:

let thine hand, I pray thee, be against me, and against my father's
house;
let me and mine die, and not they; a type of Christ, the good Shepherd, willing to lay down his life for the sheep, and suffer in their stead, that they might go free.

California - Do Not Sell My Personal Information  California - CCPA Notice