Dan Evans was unable to set up a fourth-round clash with Rafael Nadal as his Wimbledon campaign ended with a heartbreaking five-set loss to Joao Sousa.

Evans is ranked eight places higher than his opponent and this looked to be a great chance for the British number three to reach the last 16 for the first time but he fell to a 4-6 6-4 7-5 4-6 6-4 defeat after three hours and 56 minutes.

It was a contest full of tremendous shot-making, the power of the Sousa forehand against Evans’ all-court talents, but the 29-year-old paid for not converting his early dominance and taking only seven of 24 break points.

While all the attention was on Andy Murray and Serena Williams’ mixed doubles debut on Centre Court, real drama was being played out on Court One.

No one has won more matches on grass this season than Evans and he broke the Sousa serve in the opening game.

Everything about Evans’ game was working well and, after being passed down the line with a backhand and then cross court with a forehand, Sousa turned to his supporters’ box and held his arms wide in exasperation.

Joao Sousa prevailed after a five-set thriller Joao Sousa prevailed after a five-set thriller (Adam davy/PA)

This time there was no sign of his countryman Jose Mourinho, who had watched Sousa’s upset of Marin Cilic, and the 30-year-old did well to keep the opening set as close as he did.

With Evans 4-2 up in the second set and pushing for another break, a clash against Nadal looked within his grasp, but he had taken just two of 12 break points and that quickly came back to bite him.

Sousa, who had not had a single break point, stepped up his aggression and reeled off four games in a row to level the match, Evans saving three set points but then double-faulting on a fourth.

The third set was equally frustrating for Evans, who twice led by a break and served for it at 5-3 only for Sousa to put together another four-game winning streak.

Evans was beginning to look a little laboured, not surprisingly given how hard he was having to work and the amount of tennis he has played, but again he made a flying start to the fourth set, breaking serve in the opening game.

A warning for swearing that had Evans raging “I didn’t say it” seemed to briefly fire him up but the match was increasingly on the racket of Sousa, who claimed a British scalp in the first round when he defeated Paul Jubb.

Sousa levelled at 3-3 and Evans looked to be on the ropes but he kept fighting and, after taking a fourth break point at 4-4, served out to level the match, clinching it with a terrific point in which he somehow stayed in the rally and then won it with a dinked forehand pass.

With the sky grey and the light fading, it was decided the roof would be closed for the decider, and Evans found the indoor conditions immediately to his liking.

But once again Sousa would not let his opponent pull away and he brought up a first match point with a passing shot onto the line.

Evans looked like he had done the hard work to save it only to fluff a short backhand into the net, which he hung over in despair as Sousa held his arms aloft.