The book of Haggai was written after the return of the Jews from their exile in Babylon. Surrounded by enemies and struggling to repair their lives and city, the Jewish people despair and realize their need for God's help. Haggai instructs them to rebuild their temple to restore favor with God and warns them of the consequences of attempting to succeed without His blessings.