II Samuel - Chapter 24
An Important Real Estate Transaction
G-d got angry at the Jewish people (we're not told why) and He tempted David to sin. (Why did He tempt David to sin? Way back in I Samuel 26, David said to Saul, "If G-d put the idea in your head to persecute me..." Basically, G-d was saying, "Oh, I put such ideas in people's heads, do I? Fine, here's one for you.") David was tempted to conduct a census of the people. We know from Chumash that this is only permissible in a certain way and for a compelling need, not to count heads and not just because. Yoav tried to talk David out of it, but his mind was made up, so they took a census. They took nine months and twenty days to travel the whole country. They counted 800,000 men of military age in Israel and 500,000 in Judah. (These numbers differ from the parallel account in I Chronicles, which says 1,100,000 and 470,000, respectively. The reason for the discrepancy is that our account here does not include the Tribes of Levi and Benjamin among Israel, and Judah is rounded off.)
David realized that the census was a sin and he asked G-d to forgive him. G-d sent the prophet Gad to offer David a choice of punishments: seven years of famine, three months of occupying forces or three days of plague. David chose the plague, figuring it was better to let G-d strike the people than an enemy force. (Verse 24, "David said to Gad, I am greatly distressed..." is the opening line of the prayer Tachanun.) G-d sent the plague and 70,000 people died. G-d stayed His messenger of destruction when it reached Jerusalem, at the threshing floor of a Jebusite named Aravnah.
David inquired as to the merit of that place. The prophet Gad brought word to David that he was to build an altar there. Aravnah wanted to donate the threshing floor, the cattle and the tools, but David would not accept them as a gift; he insisted on paying. He paid fifty silver shekels for the property and the cattle. He offered his sacrifices and G-d answered his prayers; the plague stopped.
You're probably familiar with the location of Aravnah's threshing floor. Perhaps you've even been there. It was on a mountain called Moriah. Today we call it the Har HaBayis or Temple Mount. The threshing floor of Aravnah the Jebusite was the location where David's son Solomon would build the Temple.