Liberia is a city in Costa Rica located northwest of the capital San José, in the province of Guanacaste.