Colombia through to Copa America knockout rounds
Colombia has qualified for the quarter-finals at the Copa America after topping its group with six points after two matches, ahead of Costa Rica and Brazil, which have a point each. Paraguay is bottom with zero points.
Los Cafeteros sealed a 10th consecutive victory and 25th match without defeat as they pursued a first Copa America title since 2001.
A draw between Brazil and Paraguay would have been enough to see Nestor Lorenzo's squad secure top spot in the group, thus avoiding a probable quarter-final against Uruguay.
A draw in its final group match against Brazil should keep it there.
Despite the loss, Costa Rica, which has one point, is still in the running but needs to secure a win in its final match against Paraguay and hope for other results to go its way.
Colombia started the match well and took the lead in the 31st minute through Liverpool winger Luis Diaz, who confidently converted from the penalty spot after Costa Rica goalkeeper Patrick Sequeira bundled over Cordoba in the box.
As Costa Rica pressed for an equaliser it left itself open on the break and Colombia made it pay, with Sanchez outmuscling defender Juan Pablo Vargas to head Jhon Arias's corner past Sequeira from close range in the 59th minute.
After scoring, Sanchez held up the jersey of team mate Jhon Lucumi, who missed the match with injury.
Cordoba rounded out the scoring three minutes later after timing his run perfectly to stay onside and latch on to James Rodriguez's long ball before calmly slotting his finish past Sequeira.