West Coast have produced a last-gasp surge to overwhelm Collingwood by 16 points in a nerve-jangling AFL qualifying final.
The Eagles came from 10 points down at three quarter-time to win 12.14 (86) to 10.10 (70) on Saturday night in Perth and secure a home preliminary final.
The Magpies will host GWS in a knockout semifinal next Saturday, a day after Hawthorn meet Melbourne in the other semifinal.
West Coast and Richmond host preliminary finals in a fortnight.
The Eagles, before a record AFL crowd in Perth of 59,585 spectators, kicked the last three goals of the game in the final five minutes to prevail.
"That was a quality final, I'm really proud of our players to produce a game like that," Eagles coach Adam Simpson said.
"The game itself, it was pretty hot for most of the night ... and in the last quarter I thought we stood up in the contest and our leaders stood up."
Eagle star Elliott Yeo (36 disposals) was outstanding and teammates Jack Redden (32 touches) and Dom Sheed (27 possessions) were prolific ball-winners while Liam Ryan, Jack Darling and Josh Kennedy each kicked two goals.
The Magpies, led by Steele Sidebottom (27 touches), Tom Phillips (26 possessions) and Taylor Adams (26 disposals) were gallant.
But coach Nathan Buckley lamented his side's inability to win their share of contested possession in the frantic final term.
"We didn't execute or complete the job," Buckley said.
"Overall we were just outworked in the last 30 minutes."
West Coast made the early running, booting three goals, including two from Liam Ryan, before Magpie Travis Varcoe scored a 50m stunner from a tight angle.
All Collingwood players converged on an emotional Varcoe, who took the field just a week after his sister Maggie died from repercussions of a head knock suffered while playing in a women's football game in a suburban Adelaide league.
The Eagles, despite losing defender Brad Shepherd to a hamstring injury within 20 minutes, led 3.3 to 1.3 at quarter-time with Jeremy McGovern dominating in defence with seven marks.
But Collingwood stalwart Sidebottom turned the tide in a second quarter where the lead changed seven times in a pulsating 20-minute span.
The Magpies mainstay shrugged off his tagger Mark Hutchings to collect 10 disposals for the term as the visitors piled on six goals to West Coast's three to edge to a three-point halftime lead, 7.4 to 6.7.
Collingwood extended their advantage to 10 points at three quarter-time but it was short-lived: Eagles Kennedy and Darling slotted goals in the initial seven minutes of the last quarter to take a three-point lead.
Collingwood's Jordan de Goey again put the visitors in front with his second goal in the 18th minute.
But the Eagles finished with a flurry: goals to Lewis Jetta - with five minutes 20 seconds remaining - Darling and Jack Redden, after the siren, delivering a precious win.