King David gave orders for all the foreigners living in the land of Israel to assemble, and he put them to work. Some of them prepared stone blocks for building the Temple.