Ecuador kept alive their hopes of reaching the Copa America knockout stages, eliminating Mexico in the process, with a 2-1 win here.
Goals from Miller Bolanos and Enner Valencia proved enough for La Tricolor on Friday, who finally got off the mark in the competition following previous defeats to Chile and Bolivia. It was also their first success in a Copa fixture in 11 years.
In contrast, Mexico find themselves with the dubious honour of being the first side eliminated from the tournament, despite registering draws in their other two fixtures.
Raul Jimenez converted a penalty, awarded for a foul on Hugo Ayala at a corner, to cut the deficit in half, but Miguel Herrera's side rarely threatened to get back on level terms.
To make matters even worse for the Mexico manager, he had to watch the closing stages of the contest from the stands after being sent off.
The result at Estadio El Teniente means Chile and Bolivia are guaranteed to go through from Group A.
More From This Section
Ecuador, meanwhile, will need some luck as their goal difference (-2) leaves them as the third best third-placed team.
They made a lively start in their bid to break their duck in 2015, working Mexico goalkeeper Jose de Jesus Corona in the opening five minutes with a shot from Bolanos.
Mexico's best chance of the first half fell to Vicente Vuoso, the forward curling a shot inches wide from inside the area in the 23rd minute.
Ecuador took the lead soon after, albeit in fortunate circumstances.
Valencia's hopeful shot from the left was blocked and fell to the back post, where Bolanos reacted the quickest to scramble the ball in.
Valencia turned from provider to scorer after the break, doubling his side's lead in the 57th minute.
A poor turnover of possession in their own half put Mexico in trouble and Bolanos slid his team-mate through, the West Ham forward getting across his defender before burying his finish.
Vuoso had a half-chance saved before Mexico were awarded a penalty after Gabriel Achilier climbed all over Ayala as a corner came in.
Jimenez stepped up and made no mistake from the spot, going straight down the middle as Alexander Dominguez dived to his left.
That, though, was to be the only highlight for Mexico, their miserable night being summed up by Herrera's dismissal. They must now turn their attention to the upcoming Gold Cup, which begins on July 9.