Hawthorn will play Sydney in the AFL grand final after holding off an outstanding challenge from Adelaide to win their preliminary final by five points.
Crows forward Taylor Walker kicked his fourth goal with less than 30 seconds left but the Hawks won the centre clearance and held on to win the Saturday twilight match at the MCG 13.19 (97) to 14.8 (92).
It will be Hawthorn's first grand final since their 2008 premiership and the first time they have met the Swans in the grand final.
Sydney made the grand final with a 26-point win over Collingwood on Friday night.
Sam Mitchell starred for Hawthorn with 29 disposals and Cyril Rioli was also pivotal, especially in the frenetic last quarter.
Rioli kicked a goal at 21 minutes in the final term to put the Hawks back in front.
Captain Scott Thompson was best for Adelaide, while key forwards Taylor Walker and Kurt Tippett kicked four goals apiece.
It was a massive escape by Hawthorn, who started the match as overwhelming favourites but were well below their best.
Trailing by 16 points at the last change, Adelaide worked their way back into the game.
The margin was down to 11 points at 18 minutes when Hawks defender Ryan Schoenmakers gave away a silly free kick and Jason Porplyzia goalled.
Two minutes later, Adelaide sub Graham Johncock goalled on the run to put the Crows ahead.
But the Hawks won the next centre bounce and Rioli marked and goalled.
After a game-saving tackle by Hawks defender Ben Stratton on Patrick Dangerfield, the Hawks went into attack and Lance Franklin put them 10 points up with his third goal.
Then came Walker's goal, but Adelaide ran out of time.
The Hawks suffered a massive blow before the match when captain Luke Hodge was forced out with illness.
A club spokesperson said Hodge came down with a bout of gastro.
That robbed Hawthorn of Hodge's versatility and, more importantly given how the match started, his resolute on-field leadership.
Hawthorn started much better, but could only manage three behinds in the opening minutes.
Tippett marked and goalled at eight minutes and Ricky Henderson put through their second a minute later.
Suddenly, it was game on.
Hawthorn continued to spray their scoring shots and looked unusually sloppy, while the Crows' confidence steadily grew.
Despite Hawthorn having eight scoring shots to five and dominating the inside 50s 20-9, Adelaide led by seven points at the first change.
Hawthorn continued to mess up their scoring chances in the second term and went into halftime with 5.10.
Still, they started improving and led by eight points late in the quarter.
But Walker, who had been quiet in the first term, kicked the last two goals of the half.
He kicked a booming goal after the halftime siren, giving him three for the term and the Crows a five-point lead.
But the long break gave the Hawks a chance to regroup and Jack Gunston kicked his first goal two minutes into the third term to give them back the lead.
Franklin, well-held by Ben Rutten for most of the game, started having an influence.
Hawthorn kicked the first four goals of the quarter to take a 21-point lead.
The Crows would not go away and they went goal-for-goal with the Hawks for the rest of the term.
A shocking defensive kick from Crows defender Bernie Vince late in the term set up Rioli for a goal.
But Adelaide were still in touch, setting up the epic last quarter.
Hawthorn stared down the abyss of the worst AFL preliminary final upset of the modern game before staging a great escape to beat Adelaide by five points.
Late goals to Lance Franklin and Cyril Rioli and a crucial tackle by Ben Stratton saved the Hawks as they staved off an outstanding challenge from the Crows to win 13.19 (97) to 14.8 (92).
The Hawks will meet Sydney in next Saturday's grand final, the first time the two clubs have clashed for the premiership.
It will be the Hawks' first grand final since they upset Geelong for the 2008 premiership and Sydney's first since they lost an epic match to West Coast in 2006 by one point.
Hawthorn will start slight favourites, but they played below their best in Saturday's pulsating twilight final at the MCG.
Sydney also handed Hawthorn, the minor premiers, one of their worst losses of the season in round five and also led them by 38 points in the second term before the Hawks rallied to win their round-22 clash.
The overriding emotion for Hawks coach Alastair Clarkson after the match was relief.
"I was the only one having a baby in the last part of the game," he joked.
Hawthorn lost to Collingwood by three points in last year's preliminary final.
Clarkson added it would have been "horrendous" had the Hawks lost as a result of defender Ryan Schoenmakers giving up a crucial free kick during the final term.
The Hawks had gained a free kick because of Jason Porplyzia's crude spoil on David Hale, but it was reversed when Schoenmakers threw Porplyzia to the ground and the Adelaide player kicked a vital goal.
The Hawks easily won the inside 50s by 64-38 - at quarter-time it was 20-9 but they trailed by seven points.
That opening term set the scene for a grinding battle.
"There have been plenty of times in games like that where poor kicking actually costs you and we're lucky tonight that it didn't - we only just got across the line," Clarkson said.
"We only have one more crack at it, don't we, so we need to get it (conversion) right this week."
Hawthorn were five points down at halftime but kicked clear to lead by as much as 22 points in the third quarter.
The Crows refused to go away and after Porplyzia's goal, substitute Graham Johncock kicked another to put them a point ahead at 20 minutes.
But Rioli took a brilliant contested mark and goalled after the next centre bounce and two minutes later Stratton laid his game-saving tackle on Patrick Dangerfield in Adelaide's attack.
The Hawks rebounded and Franklin goalled to put them 10 ahead.
Taylor Walker kicked his fourth goal to reduce the margin to only five points, but there were less than 30 seconds left and the Hawks won the last centre clearance to ensure the win.
Kurt Tippett also kicked four goals for the Crows in what might be his last game for the club amid speculation he will soon join Brisbane or Gold Coast.
Crows coach Brenton Sanderson said his players were shattered but was full of praise for their performance.
"There's a lot of tears in the change rooms," he said.
"I'm so disappointed for them because they were so close to the ultimate game, but now we've had a taste of it I'm sure it'll burn and it'll hurt for a long time."