Somoto is a city and municipality located in the hills of northern Nicaragua, and capital of the department of Madriz. It is around 20 km (12 miles) south-west of Ocotal and 51 km (32 miles) north-west of Estelí. It sits on the Pan-American Highway around 16 km (10 miles) from the Honduran border crossing at El Espino.