Francisca Lara blew Chile's chance to dramatically claim a place in the last 16 of the Women's World Cup after she missed a penalty.
Needing to beat Thailand by three clear goals in their final Group F game to set up a showdown with England, Chile were leading 2-0 courtesy of an own goal from goalkeeper Waraporn Boonsing and Maria Jose Urrutia when VAR awarded an 85th-minute penalty.
With history beckoning for La Roja in their debut World Cup tournament, Lara rattled her spot-kick against the crossbar, allowing Nigeria to claim the last of the four places open to the best third-placed sides.
Lara's missed penalty was one of a host of chances missed by Chile during a pulsating match in Rennes as they laid siege to the Thai goal for most of the game.
In the first half, they twice struck the woodwork, with Urrutia's goal-bound strike taking a slight deflection off Natthakarn Chinwong and onto a post.
Four minutes from the break Rosario Balmaceda rattled the crossbar with a rasping right-footed drive from distance.
Thailand, who were hammered 13-0 by the United States and 5-1 by Sweden in their opening two group matches, were not without a threat of their own in the opening 45 minutes.
A low curler from Silawan Intamee was deflected inches past the post, while goalkeeper Christian Endler was forced to tip over the bar an attempted 35-yard lob from captain Kanjana Sung-Ngoen.
Three minutes after the interval, though, Thailand conceded their 19th goal of the tournament in calamitous circumstances as a low drive from Yanara Aedo cannoned back off a post, onto the legs of goalkeeper Boonsing and over the line.
Ten minutes from time Urrutia made it 2-0 in flicking a raking ball into the area from Paloma Lopez past the hapless Boonsing from 12 yards.
Urrutia then came within inches of making it 3-0 three minutes later when she poked a goal-bound effort past Boonsing, only for Pitsamai Sornsai to hack off the line.
Boonsing's studs-high challenge on Urrutia, though, led to a VAR review, and the awarding of the penalty that Lara thundered against the woodwork that ultimately denied Chile for the third time.
Despite seven minutes of added-on time, Chile could not find the goal they needed to secure their last-16 place, resulting in many of their players in tears at the final whistle.