Living on the edge, Nick Kyrgios expressed huge relief after riding an emotional rollercoaster into the second round of Wimbledon.

Tennis’s great enigma lived up to his self-styled role as villain on show court No.3 before escaping disaster with a tense 3-6 6-1 7-5 6-7 (3-7) 7-5 victory over British wildcard Paul Jubb, the world No.219.

Kyrgios fought with the umpire, spectators and a linesperson before ultimately winning a battle within to scrape through on Tuesday.

Watch the latest sport on Channel 7 or stream for free on 7plus >>

After serving for the match at 5-3 in the deciding set, Kyrgios had to fend off two break points in the 11th game to avoid allowing Jubb to have a crack at closing it out on his racquet.

“I thought I was going to go down there for a bit, so I’m just happy to get through,” he said after progressing to a meeting on Thursday with Serb Filip Krajinovic.

Kyrgios had pledged pre-match to embrace the pro-home crowd and to stay focused in a concerted bid to advance efficiently and without fuss to conserve energy for the later rounds.

But his game plan went out the window in the opening minutes.

The match was only three games old before Kyrgios began moaning to chair umpire Marija Cicak about engaging with fans.

He received a code violation for blasting a ball out of the court on his way to dropping the opening set in 23 minutes.

In the second set, Kyrgios told a lineswoman to “get off the court” after successfully challenging her incorrect call, then claimed she was “the worst I’ve ever seen”.

“Why are there linesmen here and not at any of the other grand slams?” he muttered at a changeover.

Not done complaining, Kyrgios demanded a mouthy fan be removed for repeatedly distracting him.

“You can’t f***ing decide to talk to me in the middle of the point when I’m about to do a backhand, It can’t be happening, bro,” he said to the spectator who the Australian later admitted to spitting towards.

“They can watch the tennis but speaking and shouting out in the middle of the point, like why?”

Also upset at the slowness of the court speed, Kyrgios continued to plead with Cicak to quieten the rowdy fans.

“You don’t accept a hat with two logos but pure disrespect from fans to athletes is acceptable,” he said.

“Racism is acceptable … when does it stop? It’s been happening for years.”

Despite all the commotion, Kyrgios stayed composed when it mattered most to eventually prevail after three hours and five minutes.

Kyrgios’s victory came after the unseeded dangerman admitted he yearned for another overdue grand slam run.

For all his rich potential, the 27-year-old has yet to even make a grand slam semi-final.

Kyrgios’ two major quarter-finals came at Wimbledon in 2014 as a teenager and the 2015 Australian Open.

“It’s like not many people have gotten over the hump of winning a slam. I’m one of the people that has to deal with that every week,” he said on tournament eve.

“Like, ‘Oh, he’s probably one of the biggest wastes of talent. He should be winning a slam.’

“Not many people have actually gotten over that hump in singles. It’s obviously something I want to get over, and hopefully one day.”

His big chance may arrive over the coming fortnight, with both last year’s runner-up Matteo Berrettini and former finalist Marin Cilic removed from Kyrgios’s depleted bottom side of the draw with COVID-19.