King David and all the Israelites went and attacked the city of Jerusalem. It was then known as Jebus, and the Jebusites, the original inhabitants of the land, were still living there.