This took place after he had defeated King Sihon of the Amorites, who had ruled in Heshbon, and King Og of Bashan, who had ruled in Ashtaroth and Edrei.