England scraped through to the quarter-finals of the Women's World Cup with a dramatic penalty shootout victory over Nigeria despite Lauren James' red card.
Despite the first penalty-taker, Georgia Stanway, firing wide, Nigeria missed their next two efforts and the European champions secured their spot in the last eight when Chloe Kelly smashed in the winning kick.
In an outburst of frustration, James stamped on Michelle Alozie's back in the 87th minute after losing possession and was rightly shown a red card following a video assistant referee (VAR) review.
England were given an almighty scare but face Colombia or Jamaica next at 11:30 BST on Saturday.
It was an excruciating watch for England supporters in Brisbane as England played 120 minutes on a knife's edge and were largely second best to Nigeria.
James' petulance meant England had to navigate extra time with 10 players, and Nigeria had their tails up following a sustained period of pressure prior to the Chelsea star's sending-off.
The nine-time African champions executed their gameplan to perfection, frustrating England, causing them problems on the break and winning almost every duel.
They hit the crossbar in each half, Ashleigh Plumptre's powerful drive ricocheting off the woodwork before Uchenna Kanu's header looped over goalkeeper Mary Earps and bounced off the top of the bar.
Earps was kept busy throughout, needing to produce smart saves to deny Plumptre at her near post in the first half and later keeping out Uchenna Kanu, who had an excellent performance.
Sarina Wiegman's England side thought they had a penalty in the first half when Rachel Daly went down claiming a push by Rasheedat Ajibade, but it was overturned by VAR.
Eventually, England stumbled to the end of normal time lacking the fluidity they showed in abundance in the impressive display against China and held on to seal the deal in a shootout.
Only 24 hours earlier, back-to-back champions the USA were knocked out of the competition, and England were forced to show resilience to overcome one of their most challenging matches of Wiegman's tenure.
James' red card puts dampener on impressive tournament
In the build-up to England's last-16 tie there was plenty of praise for James, who has been simply sensational so far in Australia.
The 21-year-old stole the show in Adelaide when she scored two goals and assisted three in England's thrashing of China in their final group game.
But, as Wiegman has often reminded people, James is still young in terms of international experience, with this only her 15th appearance since making her debut a year ago.
She struggled to get on the ball in the first half as England's build-up play was slow and disconnected - a far cry from their slick attacking play against China.
As the game wore on several England players became frustrated. They were fortunate James' reactionary stamp did not prove too costly and they showed the type of resilience that has formed since Wiegman's arrival in September 2021.
James will miss the quarter-finals and could face a longer suspension should Fifa deem it worthy.
Her loss will certainly be felt given she is England's leading scorer at the tournament, having also popped up to provide the winner in the 1-0 victory over Denmark in the second group game.
Nigeria leave with heads held high
Nigeria manager Randy Waldrum had already praised his side's efforts in escaping a group containing Olympic champions Canada, co-hosts Australia and plucky debutants the Republic of Ireland.
He said victory over European champions England could have "significant implications" for the development of women's football in Nigeria, but they can exit the tournament with their heads held high.
They more than matched England and carried momentum going into extra time, but just could not provide the ruthlessness that was needed.
England captain Millie Bright made numerous last-ditch blocks, Earps faced more shots in the first half than in any other game under Wiegman and Nigeria rattled the Lionesses.
All signs had started to point to a historic Nigeria victory - they were seeking to become the first African nation to win a knockout tie - and even a corner from Stanway floated out of play in a rare break-up of Nigeria possession late in the second half.
But in the end England found a way, as they so often have under Wiegman, and it was the familiar sight of Kelly - who netted the winning penalty in the shootout victory over Brazil in the Women's Finalissima and scored the Euro 2022 winner against Germany - who ran away celebrating at the end.
Line-ups
England
Formation 3-4-1-2
1Earps
16Carter6Bright5Greenwood
2Bronze8Stanway4Walsh9Daly
7James
23Russo11Hemp
1Earps16Carter6Bright5Greenwood2Bronze8Stanway4WalshSubstituted forZelemat 120'minutes9Daly7JamesBooked at 87mins23RussoSubstituted forKellyat 88'minutes11HempSubstituted forEnglandat 105'minutesSubstitutes
3Charles10Toone12Nobbs13Hampton14Wubben-Moy15Morgan17Coombs18Kelly19England20Zelem21Roebuck22RobinsonNigeria
Formation 4-2-3-1
16Nnadozie
22Alozie3Ohale14Demehin2Plumptre
10Ucheibe18Ayinde
12Kanu7Payne15Ajibade
6Onumonu
16Nnadozie22Alozie3Ohale14Demehin2Plumptre10Ucheibe18AyindeSubstituted forEcheginiat 90'minutes12KanuSubstituted forOrdegaat 81'minutes7PayneSubstituted forOparanozieat 114'minutes15Ajibade6OnumonuSubstituted forOshoalaat 58'minutesSubstitutes
1Oluehi4Ogbonna5Ebi8Oshoala9Oparanozie11Monday17Ordega19Echegini20Imuran21Okoronkwo23BalogunReferee:Melissa BorjasAttendance:49,461Live Text
Match ends, England 0(4), Nigeria 0(2).
Penalty Shootout ends, England 0(4), Nigeria 0(2).
Goal! England 0(4), Nigeria 0(2). Chloe Kelly (England) converts the penalty with a right footed shot to the top left corner.
Goal! England 0(3), Nigeria 0(2). Christy Ucheibe (Nigeria) converts the penalty with a right footed shot to the top right corner.
Goal! England 0(3), Nigeria 0(1). Alex Greenwood (England) converts the penalty with a left footed shot to the bottom right corner.
Goal! England 0(2), Nigeria 0(1). Rasheedat Ajibade (Nigeria) converts the penalty with a right footed shot to the centre of the goal.
Goal! England 0(2), Nigeria 0. Rachel Daly (England) converts the penalty with a right footed shot to the top left corner.
Penalty missed! Bad penalty by Michelle Alozie (Nigeria) left footed shot is too high. Michelle Alozie should be disappointed.
Goal! England 0(1), Nigeria 0. Bethany England (England) converts the penalty with a right footed shot to the high centre of the goal.
Penalty missed! Bad penalty by Désiré Oparanozie (Nigeria) right footed shot is close, but misses to the left. Désiré Oparanozie should be disappointed.
Penalty missed! Bad penalty by Georgia Stanway (England) right footed shot is close, but misses to the left. Georgia Stanway should be disappointed.
Penalty Shootout begins England 0, Nigeria 0.
Second Half Extra Time ends, England 0, Nigeria 0.
Bethany England (England) wins a free kick in the defensive half.
Foul by Francisca Ordega (Nigeria).
Delay over. They are ready to continue.
Substitution, England. Katie Zelem replaces Keira Walsh because of an injury.
Delay in match because of an injury Keira Walsh (England).
Attempt missed. Bethany England (England) header from the centre of the box misses to the left. Assisted by Alex Greenwood with a cross following a set piece situation.
Georgia Stanway (England) wins a free kick on the right wing.