West Coast have entrenched themselves further in the AFL top four after surviving a scare and beating 17th-placed Melbourne by 13 points in Alice Springs.
The Demons had fought back from a 32-point deficit to be up by a goal at Sunday's final change and looked set for one of the upsets of the season.
It is the second time this year the Eagles haverun over the Demons in the last quarter. In May, Melbourne had been 12 points up at three-quarter time when the teams played in Perth.
Eagles coach Adam Simpson said the 14. 7 (91) to 11. 12 (78) win was a tight grind that ebbed and flowed. He said the reigning premiers could be playing better but he "was just worried about winning at the moment".
"We are trying to qualify for the finals and I am not quite sure if we are there yet," he said.
"If we had gone down today, we would've been back to the pack.
"Once we qualify, we can have a crack at hopefully the top four and, if we get that, the top two but that might not happen."
The Eagles are in third place with only a small percentage separating them from Brisbane and a game and percentage from Geelong in top spot.
The Demons had dominated much of the second and third quarters and started to kick straight, while West Coast looked shaky without their captain and backline general Shannon Hurn, who was a late withdrawal with an ankle injury.
Elliot Yeo had had a relatively quiet match but, three minutes into the final quarter, he had a set shot from about 52 metres out and kicked a team-lifting goal.
That levelled the scores in front of a sellout crowd of 7164 at Traeger Park, with the MacDonnell Ranges providing a unique desert backdrop.
Jack Darling quickly kicked the next two goals - his third and fourth - including one from a dodgy free kick that went against Max Gawn for holding the ball.
The match followed the script in the second term, with the Eagles kicking the first two goals for a 32-point lead.
Melbourne booted six of the next seven majors, with Bayley Fritsch kicking four.
Melbourne coach Simon Goodwin said he'd had enough of the club not winning matches they could have won this year. Seven of their 12 losses have been by four goals or less.
"We can either sit here and say we're proud of the performance against a really good team and we're moving forward, or we can say enough's enough," he said.
"We're just not finishing our work off, both in an efficiency way but long enough in the game to be a really good team and that's what we're aspiring to be - that's what we're really confident of becoming."
Australian Associated Press