Fewer Words Version: While the ark was being carried to Jerusalem, David danced nearly naked, with only a linen ephod covering him.
When David's first wife, Michal, saw David's performance, she despised him and said to him, "How glorious was the king of Israel today, who uncovered himself to all the slave girls in the kingdom, like some shameless man who exposes himself."
David replied, "God chose me as king over your father and your family. I will play before him if I want to. So I will be even more vile than that. I will be disgusting in my own sight but honored by all the slave girls in the kingdom."
God punished Michal for criticizing David so that she never had any children. 2 Samuel 6:13-23