PERTH  - Serbian duo Novak Djokovic and Ana Ivanovic suffered another painful dose of Hopman Cup heartache when they were edged out by Spain in the final which finished in the early hours of Sunday.

Playing together in the mixed teams tournament for the third time, the pair went into the final as the favourites, but the Spanish duo of Anabel Medina Garrigues and Fernando Verdasco claimed the title by winning the deciding mixed doubles. Djokovic had given the Serbians the lead in the final with a 6-3, 7-5 win over Verdasco, but Medina Garrigues levelled the decider with a 6-4, 6-7 (3/7), 6-2 win before the Spaniards took the doubles 6-4, 7-5.

Any doubt about the commitment of the quartet was dispelled by Spain's jubilation at winning, and the obvious emotion of Djokovic and Ivanovic as they realised the doubles clash was slipping away. The Serbian pair were desperate to win after having come just short at their two previous Hopman Cup appearances.

In 2006, representing Serbia and Montenegro, the pair missed the final on a countback of sets won during the round robin matches. Then in 2011, they qualified for the final only to be forced out of the tournament when Ivanovic suffered an abdominal injury.

To make matters worse for Djokovic, he was also a beaten finalist with Jelena Jankovic in 2008. The Serbians provided great entertainment during the week, hamming it up for the crowd and media between matches and during mixed doubles rubbers.

As enjoyable as the tournament had been for the duo, however, Djokovic said they had again been left lamenting unfinished business.

"It's a disappointment because we haven't won the title, and that's something that was a goal of ours," he said. "We had a chance a few years ago but it was unfortunate because of Ana's injury we had to pull out in the finals. Today we were just beaten by a better team in the mixed doubles and also Anabel played an incredible singles match."

Ivanovic, who struggled to adapt to the mixed doubles in the final, said she was keen to return for a fourth time with Djokovic. "It's disappointing we were so close, but I really hope Novak will agree to play with me again even after today, and we can come back and then win a trophy," she said.