Trailing 20-0 with eight minutes remaining, Tonga produced an incredible comeback to score three tries in five minutes, and were denied a fourth on the final siren, to fall agonisingly short of booking an historic World Cup Final berth.
Four-pointers to Tevita Pangai Junior, Siliva Havili and Tuimoala Lolohea sent the 30,003-strong crowd at Mount Smart Stadium into mayhem, and very nearly saw Tonga continue their incredible unbeaten run.
An Andrew Fifita lost ball in a last-gasp charge at the line – before regathering and planting the ball in the England in-goal – was ruled a lost ball rather than a strip, despite protests from the Tongan players.
For England, it ends a two-decade absence from the World Cup Final, booking them a place against defending champions Australia in Brisbane.
Spurred on by another brilliant performance from fullback Gareth Widdop, England scored three tries and up until the final 10 minutes had defended their line brilliantly.
In a game where there was little else between the two teams, Tonga's 15 errors and 36 missed tackles ultimately allowed England to get the better of them in the arm wrestle, while Wayne Bennett's men benefitted from superior kicking and decision-making on last tackles.
England had scored 12 points inside the opening 20 minutes to put themselves firmly in control, with Widdop's long break laying the ground work for McGillvary to cross off a scrum set piece, before the St George Illawarra fullback ducked under a would-be tackle from Daniel Tupou to score the second, while he also converted both efforts.
Tonga had enough chances of their own to draw level or even take the lead in the back end of the first stanza, looking particularly dangerous while coming out of their own half, but lacked execution when it counted.
Twice Lolohea produced senseless kicks for himself, while a number of his teammates coughed up errors inside the attacking 20, leaving England with a comfortable lead at the break.
Tonga should have struck four minutes into the second half, only for Tupou to drop the ball cold with the line beckoning.
Widdop stretched the lead out to 14 with a penalty on 50 minutes, before England wore Tonga down with repeat sets culminating in Widdop sending John Bateman over from close range.
The late flurry of tries saw Pangai Junior crash over, before Havili and Lolohea pierced through the heart of the English defence, with Sio Siua Taukeiaho converting all three, only for the fingertip of Elliott Whitehead to knock the ball free from Fifita's grasp and deny the miraculous comeback in the final seconds.
England 20 (Jermaine McGillvary, Gareth Widdop, John Bateman tries; Gareth Widdop 4 goals) def. Tonga 18 (Tevita Pangai Junior, Siliva Havili, Tuimoala Lolohea tries; Sio Siua Taukeiaho 3 goals) at Mount Smart Stadium. Half time: England 12-0. Crowd: 30,003.
Credit: Shane Wenzlick. Copyright: NRL Photos.England celebrate a try in their World Cup semi-final win over Tonga.