Nick Kyrgios set up a potentially explosive second-round Wimbledon showdown with Rafael Nadal after a typically erratic and occasionally dramatic five-setter with Jordan Thompson.The volatile 24-year-old earned a code violation for whacking a ball out of court and lost a set to love for the first time at a Grand Slam.Kyrgios threw in five attempted ‘tweeners’ – all of which missed – and an underarm serve on set point which also backfired.But he still managed to beat fellow Australian Thompson 7-6, 3-6, 7-6, 0-6, 6-1 in just under three-and-a-half hours.Kyrgios, fined more than £13,000 for his histrionics at Queen’s Club a fortnight ago, was on the brink of full meltdown mode again on a packed Court Three.

Serving at 4-5 in the third set, he began complaining to the umpire about a camera lens shining in his eyes and a woman who was speaking too loud.

The code violation, for smashing a ball out of the court, and an argument over a wrong line call – corrected after a challenge – irked Kyrgios further.

But fuelled by his usual sense of injustice, he held serve with an ace and promptly broke to love, only for the underarm serve to cost him the following game and force a tie-break.

The ensuing 19 minutes was classic Kyrgios. Spectacular winners, maddening shot choices, football-style celebrations, more complaints over line calls and eight set points before Kyrgios got over the line 12-10.

Yet, in the following 18 minutes he managed to lose the entire fourth set, collecting just five points along the way.

Kyrgios was chuntering to himself constantly, but with the match all-square, he refocused, re-calibrated, and simply blew Thompson away in the decider.

The victory raised the prospect of a tantalising meeting with Nadal, whom he beat at Wimbledon as a teenager five years ago, and who he branded ‘super salty’ in a recent podcast interview.