Spain upset Serbia's world number one Novak Djokovic and teammate Ana Ivanovic 2-1 to win their fourth Hopman Cup in an emotional final which finished in the early hours of Sunday.
The Spanish pairing of Fernando Verdasco and Anabel Medina Garrigues were underdogs against the top-seeded glamour Serbian pairing of Djokovic and Ivanovic.
However, the Spaniards came from behind to clinch the title in the deciding mixed doubles rubber.
The Spanish pair's massive edge in doubles experience came to the fore as they won in straight sets, 6-4, 7-5, to deny Serbia their first title.
"She won three singles matches and she played really good in the mixed...Today Anabel was unbelievable"
Spain's Fernando Verdasco
Verdasco and Medina Garrigues were particularly effective in capitalising on Ivanovic's shaky play at the net and even though Djokovic tried desperately to lift his team-mate his efforts were in vain.
Medina Garrigues ranked the win up there with her doubles wins at the French Open in 2008 and 2009.
"Winning the Roland Garros doubles was exciting also, but here I didn't expect to be in the final and then win, so I am really happy," she said.
Verdasco paid tribute to the efforts of Medina Garrigues.
"She won three singles matches and she played really good in the mixed," he said.
"Today Anabel was unbelievable."
It was a third near miss for the Serbian pair in Perth, who played together at the event in 2006 and 2011.
At their first appearance, representing Serbia and Montenegro they missed the final on a countback of sets won during the week, and in 2011 they qualified for the final but were then forced out by an abdominal injury to Ivanovic.
"We were unfortunate last time, this time we were beaten by a better team," Djokovic said.
Djokovic had appeared to put Serbia on track to claim the title when he won the men's singles clash with Verdasco, 6-3, 7-5.
However, Medina Garrigues, who battled a back problem early in the tournament, then levelled the tie with a 6-4, 6-7 (3/7), 6-2 win in a marathon match that went on for two hours and 38 minutes.