BELGRADE, Serbia -- Canada's Davis Cup run came to an end after Serbia's Janko Tipsarevic beat Vancouver's Vasek Pospisil 7-6 (3), 6-2, 7-6 (6), giving Serbia a 3-2 win in the best-of-five tie.

Tipsarevic took a commanding 5-1 lead in the decisive tiebreak but had trouble closing out the game until match point when he desperately dove for a Pospisil dropshot.

The euphoria for the hosts started when the ball just barely made it over the net and past a helpless Pospisil, who had fallen to get to his previous shot and had to be helped off the floor.

Tipsarevic remained on the floor but it was under a pile of his teammates who piled on top of him in celebration.

As it was in the tiebreak, so it was earlier in the final set when Tipsarevic had difficulty closing out the plucky Canadian. Tipsarevic broke Pospisil in the fourth game of the third set but faltered while serving for the match and allowed Pospisil to tie the set 5-5, giving the Canadian a glimmer of hope.

Pospisil needed treatment at 2-2 in the first set for an apparent right elbow injury. He came back and narrowly lost the first set in a tiebreak but faded in the latter two sets.

Tipsarevic broke the 41st-ranked Pospisil in the first game of the second set and held serve to see out the second.

It was the third match of the weekend for Pospisil after he opened the tie losing to Novak Djokovic on Friday before being part of the doubles team with Daniel Nestor that won on Saturday.

Tipsarevic effectively kept the 23-year-old Canadian on the run in a number of long, baseline rallies and got 65 unforced errors out of Pospisil.

Serbia is back in the final for the first time since winning the tournament in 2010. It will face the Czech Republic, in the final round.

Earlier, world No. 1 Novak Djokovic forced the decider when he took down No. 11 Milos Raonic 7-6 (1), 6-2, 6-2 in the first match of the day at Kombank Arena.

Raonic, of Thornhill, Ont., came in with a slight ankle injury that he picked up in his win over Tipsarevic on Friday.

"I didn't feel limited. I just felt like I was dealing with discomfort," said Raonic in his post-match press conference.

"It was getting worse and worse, little by little and I was sort of trying to put it all out there and fight through that situation as much as I could and try to pretty much nullify it in my mind and get through as much as I can."

Djokovic finished the two hour, eight minute long match with some sublime shot-making in the third set. Djokovic flourished on the clay court, a surface on which Raonic has had his struggles.

It was a close first set that took just over an hour with the players trading breaks in the fifth and sixth games before Djokovic took control early in the tiebreaker.

"I think I made one mistake on that tiebreak to make it 5-0. So I didn't really make too many terrible errors," said Raonic. "I wish I could have not kept falling behind first. I did get break him twice but it was always when I was behind."

The small bastion of Canadian support has been loud all weekend but Djokovic used the home crowd to his advantage when Raonic had a chance to break in the fourth game of the second set.

Djokovic fought off double break point and when he got back to deuce, he threw his hands into the air, imploring his compatriots to make themselves heard. They were more than happy to help, and when Djokovic won the game, he reacted with a big fist pump.