The protracted struggle weakened both states, encouraged the vassal lands conquered by David east of the Jordan—Moab, Edom, Ammon and others—to regain their independence and opened the way to invasion by Egypt. King Shishak “with a large army” captured fortified border posts and approached Jerusalem, which Rehoboam saved from conquest only by paying tribute to the enemy in the form of golden treasure from the Temple and royal palace.