2 Samuel 6:10
So David would not remove the ark of the LORD unto him into the city of David: but David carried it aside into the house of Obed-edom the Gittite. So David would not remove the ark of the LORD unto him into the city of David: but David carried it aside into the house of Obed-edom the Gittite.
Uzzah was struck dead for touching the ark. The rejoicing procession toward Jerusalem turned to terror, grief and mourning. David was astonished and greatly alarmed, and questioned God's justice, even though he had meant to honor the ark as the symbol of the divine presence. Afraid of the Lord, David would not bring the ark on into the city of David but turned it aside to remain nearby in the house of Obed-edom the Gittite.
He felt it would be unsafe to have the ark near him, fearing that as a sinful man his own sin or presumption might bring God's wrath upon him as it had upon Uzzah. The ark remained there for three months. The Lord blessed Obed-edom and his household because the ark was there.