At least the gloom over Wimbledon has been lifted. Novak Djokovic, looking at the end of his vast reservoir of energy and courage after a total of 16 hours on court for his five matches, fell over the finish line into the semi-finals yesterday by beating Marcos Baghdatis of the sublime swing and the sunshine smile, in the tournament's best encounter so far.

The score was 7-6 (7-4), 7-6 (11-9), 6-7 (3-7), 4-6, 7-5 and the match lasted one minute short of five hours, although it was short of very little else. It had character: the warrior versus the artist, the stoic versus the romantic, and the economiser versus the prodigal. It had plot: Baghdatis had tossed away the second set but still created improbably fascinating comebacks from breaks of service down in the third and fourth, before Djokovic dug a trench of resistance in the fifth which the Cypriot could not overcome.

And it had surprises. Baghdatis looked gone when he called the trainer for a shoulder problem in the third set, but revived as though it had all been a ruse. Djokovic was imperturbable till he grew tired, then suddenly smashed a racket and got a code-of-conduct warning. And a part of the crowd grew so excited that they had to be calmed down by the police. "The atmosphere was fantastic," the Serb said. "This is some of the best tennis I have ever played. People saw it was a really close match and great tennis and some of them supported me as well, which is really good."

It was also a purist's delight. The rallies were long and colourfully patterned, both men moved like the wind until the later stages, and when Djokovic slowed noticeably in the fourth set the energy count was almost as important as the score. Baghdatis once tried to eat his racket, and grinned and gesticulated; but he also fretted and chastised himself, too much perhaps for his own good. Generally the Serb had his emotions more under control, a quality mirrored by the consistency of his play.

There was a wonderfully fluctuating first set. Baghdatis relinquished an early initiative, regained it, got the first mini-break in the tie-break and relinquished it again with a double fault and a forehand into the net. Djokovic, by typical contrast, made three stunning inside-out forehands at critical moments to snatch the set.

Baghdatis was unlucky with net cords and once he appeared to have saved a set point only for the point to be replayed because a ballboy had encroached. Soon the Cypriot was putting his hands together as if in supplication. But it still looked as though he would win the second-set tie-break in which he held six set points. Instead Djokovic converted his first, making a successful Hawk-Eye challenge to a first-serve ace and finding a forcing return on the second serve. It was his eighth tie-break success out of 10 this fortnight.

"I feel like the racket is too heavy," Baghdatis told the trainer when he was 3-0 down in the third, but from that moment he began to wield it like a wand, conjuring two magical breaks of serve, a 5-3 lead and eventually, after some wobbles, the set.

Gradually Djokovic's problem with his leg worsened. He tired, his patience dwindled and Baghdatis gained momentum. And eventually, too, some luck. Djokovic slipped behind the baseline to help give the Cypriot a break back for 4-4 and at last a net cord fell Baghdatis's way - on set point, taking the contest to a decider.

The pace slowed noticeably as they struggled deep into the fifth hour. But then the Cypriot suffered a brainstorm, pushing a drop shot into the net with the court yawning as he dropped serve to go 6-5 down. Djokovic closed out the match slowly, relentlessly, and leaned back with a slightly drunken smile. He then made the sign of the cross, shed a few tears, and hugged Baghdatis, revealing in the process that he was not far from collapse.

Today the Serb faces Rafael Nadal, who blew away Tomas Berdych 7-6, 6-4, 6-2 on Centre Court. Against Mikhail Youzhny in the previous round the No2 seed came from two sets down to play what he described as "the best three sets of grass-court tennis" of his life. Yesterday's winds made a repeat impossible but his commitment was extraordinary. On one point in the second set he plunged low on the backhand to dig out a big serve, spun round and then raced along the baseline to deliver a perfect forehand down the line.

Last year's final between Nadal and Roger Federer might have been a different story had the former served out the second set at 5-4 or taken advantage of a 3-1 lead in the tie-break which he lost to go down 6-0, 7-6, 6-7, 6-3. Could it be different this year? "I have to beat Djokovic first," Nadal grinned.