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.
as well as all the land of the kingdom of Og of Bashan, who had ruled in Ashtaroth and Edrei. He was one of the last of the Rephaites. Moses had defeated them and driven them out.
Also included was Gilead, and Ashtaroth and Edrei, the towns of king Og in Bashan. This was the land allotted to the descendants of Machir, son of Manasseh, for half of them, by families.