After 40 years in the desert led by Joshua, the Hebrews fought for 4 years to take back the land of Canaan from the Canaanites who already lived there. Saul became the first king and during a battle with the Philistines, the young David killed Goliath. David then became king in 1000 BC and united the kingdoms of Israel and Judah, establishing Jerusalem as the capital. Solomon built the Temple of Jerusalem to hold the Ark of the Covenant, completing it after 3,000 workers and heavy taxes. In 931 BC, the northern Israelites broke away to form their own kingdom of Israel while the south remained Judah.