Ayerbe is located 28 km from Huesca on highway A 132 in the direction of Pamplona, on the Gállego river. It is bounded by Riglos crags and the Santo Domingo range of hills to the north; to the east by the villages of Loarre and Loscorrales; to the south by the villages of Lupiñén-Ortilla, and to the west by the villages of Biscarrues and Murillo de Gállego. It is located at 42°16′36″N 00°41′21″W﻿ / ﻿42.27667°N 0.68917°W﻿ / 42.27667; -0.68917Coordinates: 42°16′36″N 00°41′21″W﻿ / ﻿42.27667°N 0.68917°W﻿ / 42.27667; -0.68917, with a height above sea level of Alicante of 582 m. and an area of 63.29 square kilometres.