Ayerbe is a town in the Hoya de Huesca comarca, in the autonomous community of Aragon in Spain.
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°WCoordinates: 42°16′36″N 00°41′21″W / 42.27667°N 0.68917°W, with a height above sea level of Alicante of 582 m. and an area of 63.29 square kilometres. It is located in an excavated erosive depression in the surface of the Tertiary period.
The soil is dry, loose and stony, generally level with a sprinkling of small isolated hills. The land is largely covered by pines, olive and almond trees, with vineyards making a comeback. There are also areas of cereal production to the east and south. It is also populated by evergreen oaks, rosemary, gorse and other shrubs in addition to grass. There are occasional occurrences of rabbits, hares and partridges.