And Dovid built there a Mizbe'ach unto Hashem, and offered olot (burnt offerings) and shelamim (peace offerings). So Hashem was entreated for the land, and the magefah (plague) was withdrawn from Yisroel.