Águilas is built on the landward side of a small peninsula, between two bays—the Puerto Poniente on the south-west, and the Puerto Levante on the north-east. The Puerto de Aguilas, close to the centre of the city, is flanked on its western side by a large rocky hill. On its top sits the Castillo de San Juan de las Águilas castle, built in the 18th century on the site of a much older Carthaginian fortification. King Charles I ordered its refurbishment in 1530 to help protect the coast from Turkish and Algerian incursions. The rock cut from the south side of the castle's hill, and which left it with an almost vertical wall up to the castle on that side, was used to expand Aguilas' port in the early 20th century. The city sits at the end of the Murcia to Aguilas RENFE train service.