This happened after he defeated Sihon king of the Amorites, who ruled in Heshbon, and then at Edrei after he defeated Og king of Bashan, who ruled in Ashtaroth.