II Chronicles - Chapter 12
Shishak Attack
Rechavam started out a righteous (if flawed) king, but once he felt secure in his reign, he became full of himself and turned his back on G-d. In the fifth year of his reign, Shishak, king of Egypt, waged war against Jerusalem. They brought 1,200 chariots, 60,000 horsemen and countless troops. He captured Rechavam's strongholds and proceeded to Jerusalem.
The prophet Shmayah came to Rechavam and the other leaders who had gathered in Jerusalem. He told them that G-d was letting Shishak win because Rechavam and his officers had turned their backs on Him. The king and his men acknowledged that G-d was right and they humbled themselves before Him. Because of this, G-d softened the decree: Shishak would not destroy Jerusalem, but Judah would become a vassal state to Egypt.
Shishak arrived and plundered the treasures of the Temple, as well as the gold shields Solomon had made and other valuables. Rechavam replaced the gold shields with copper and gave them to the officers in charge of his escort. (The gold shields were stationary, remaining in the palace; the copper replacements were mobile, accompanying the king.)
Because Rechavam humbled himself, and because things weren't all bad in Judah, the punishment was mitigated. Rechavam reigned for 17 years; the middle of his reign was evil, but the start and end weren't so bad. However, Rechavam and Yeravam were in a perpetual state of war. When Rechavam died, he was succeeded by his son, Aviya.