2 Samuel.
Chapter 24.
The Lord was angry with Israel, and he provoked David against them, saying, “go and take a census of Israel and Judah.” 
So David told Joab, the army commander, “Go and count the Israelites from Dan to Beersheba, so I can have a total number.” 
But Joab replied to the king, “May the Lord multiply his people a hundred times over, Your Majesty, and may you live to see it! But why does Your Majesty want to do this?” 
But the king was adamant so Joab and the army commanders left the king and went to census the people of Israel. 
They crossed the Jordan and camped on the south side of the town of Aroer, in the middle of the valley, and then continued towards Gad and Jazer. 
Then they went on to Gilead, and to the land of Tahtim-hodshi; and then continued towards Dan, and from Dan around to Sidon. 
After this they went to the fortress of Tyre, and all the towns of the Hivites and Canaanites. They ended up in the Negev of Judah at Beersheba. 
After traveling throughout the whole country for nine months and twenty days, they returned to Jerusalem. 
Joab reported to the king the number of people that had been counted. In Israel there were 800,000 fighting men who could use the sword, and in Judah there were 500,000. 
Afterwards, David felt really bad for ordering the census. He said to God, “I have committed a terrible sin by doing this. Please take away the guilt of your servant, for I have been very stupid.” 
When David got up in the morning, the Lord had sent a message to the prophet Gad, David's seer, saying, 
“Go and tell David that this is what the Lord says: ‘I'm giving you three options. Choose one of them, and that's what I'll do to you.’” 
So Gad went and told David, “You can choose three years of famine in your land; or three months of running from your enemies while they chase you; or three days of plague in your land. So think about it and decide how I should reply to the One who sent me.” 
David replied to Gad, “This is an awful situation for me! Please, let the Lord decide my punishment, for he is merciful. Don't let me be punished by people.” 
So the Lord sent a plague on Israel from that morning until the time designated, and seventy thousand people died from Dan to Beersheba. 
But just as the angel was getting ready to destroy Jerusalem, the Lord relented from causing such a disaster and told the destroying angel, “That's enough. You can stop now.” Right then the angel of the Lord was standing beside the threshing floor of Araunah the Jebusite. 
When David saw the angel striking down the people, he said to the Lord, “I'm the one who has sinned; I'm the one who has done wrong. These people are just sheep. What have they done? Punish me and my family instead.” 
On that day Gad went to David and told him, “Go and build an altar to the Lord on the threshing floor of Araunah the Jebusite.” 
So David went and did what the Lord had ordered, as Gad had told him. 
When Araunah looked up, he saw the king and his officials approaching. So he went out and bowed before the king with his face to the ground. 
“Why has Your Majesty come to see me, your servant?” Araunah asked. “To buy your threshing floor so I can build an altar to the Lord in order that the plague on the people may be stopped.” David replied. 
“Take it, and Your Majesty can use it to make offerings as you think best,” Araunah told David. “Here are the oxen for burnt offerings, and here are the threshing boards and the yokes for the oxen for firewood. 
Your Majesty, I, Araunah, give it all to the king.” Araunah concluded by saying, “May the Lord your God respond positively to you.” 
“No, I insist on paying you for it,” the king replied. “I won't present burnt offerings to the Lord my God that didn't cost me anything.” David bought the threshing floor and the oxen for fifty shekels of silver. 
David built an altar to the Lord there, and presented burnt offerings and friendship offerings. The Lord answered his prayer for the country, and the plague on Israel was stopped.
