Spain have toasted Roberto Bautista Agut after the 31-year-old returned from his father's funeral to help lift the Davis Cup in Madrid.

World No.1 Rafael Nadal sealed glory for the hosts in the inaugural edition of the revamped event after Bautista Agut recorded an emotional victory in the championship tie against Canada.

Watch Spain lift the trophy in the video above

Bautista Agut's win over Felix Auger-Aliassime came just three days after the death of his father, and one day after the funeral.

He had taken leave early in the tournament to visit his ailing dad, whose health deteriorated quickly after an illness that stemmed from a 2016 accident, and the trip home became a goodbye.

After the funeral there was only one thing left for Bautista Agut to do: return to tennis.

It was the same coping mechanism that worked last year, when he lost his mother.

"I was lucky to live the last minutes of life of my dad and to say goodbye to him," he said after the Davis Cup win.

More on 7NEWS.com.au:

"Everyone takes personal decisions. I think my dad would have told me off if I had stayed at home.

"After living a tragedy, the best thing you can do is to step forward. This is what I have tried to do after the tragedies that I have lived in the last few years.

"I drove here from Castellon yesterday and I didn't think about playing. I came to support the team with all my heart. But once we qualified for the final, I started feeling like playing."

Pointing to the sky after his 7-6 (7-3) 6-2 win over Auger-Aliassime, Bautista Agut was soon in tears and embraced first by captain Sergi Bruguera and, after the title was won, by Nadal.

Roberto Bautista Agut was embraced by Spain captain Sergi Bruguera after his win. Credit: Clive Brunskill / Getty Images

The 19-time grand slam champion defeated Canadian youngster Denis Shapovalov 6-3 7-6 (9-7) but it was his teammate's efforts that stuck in his mind.

"I won eight matches this week but Roberto was the vital person for this title. What he did is not human," he said.

"It will be an example for the rest of my life. He had to leave, then his dad died, then he came back and practised with us yesterday, and today he was ready again to play at a very high level. It was something incredible."

Bruguera followed: "Unbelievable. Imagine Roberto yesterday was in the funeral of his father, now he is here giving everything. The mentality, the spirit, giving everything for his team."

The Davis Cup victory was Spain's first since 2011 and sixth in total.

Nadal had worked overtime all week, often leaving the court late at night, to win all eight matches he played.

"Rafa, I don't know if he is an alien or what. Not one day we went to sleep before 3am this week," Bruguera said.

Small crowds in Madrid for neutral matches at the 18-team tournament had marred the first running of the week-long event.

Spain have won the Davis Cup for a sixth time. Credit: Getty

But the stadium was full for Spain's ties and again for the final, ensuring roars of 'Campiones' echoed around the arena.

"It was a dream day and all the team members have made an incredible effort," Bautista Agut said.

"It can only be because we are Spanish."

- with AAP