Nick Kyrgios smashes his racket after his three-set defeat to Rafael Nadal.
CNN  — 

The best and worst of Nick Kyrgios was on display in Indian Wells on Thursday, as the supremely talented yet frustrating Australian lost in three sets to Rafael Nadal in a thrilling quarterfinal clash.

Kyrgios gave the Spaniard his sternest test of the tournament so far, but Nadal eventually came out on top, winning 7-6 (0) 5-7 6-4 to set up a semifinal clash with rising Spanish star Carlos Alcaraz.

However, Kyrgios smashed his racket in frustration following the defeat and an unfortunate bounce meant it came close to hitting a ball boy, who was able to move out of the way in time.

The incident led to the crowd booing the 26-year-old, who had previously gotten into a back-and-forth with a heckling fan during the match.

“I just want to apologise to that ball kid at the end of the match,” Kyrgios wrote on Instagram. “It was a complete accident and was frustrated at the end of the match.

“My racket took a crazy bounce and was never my intention. If anyone knows who that ball kid is, send me a message and I will send a racket to him. I’m glad he’s OK!”

Kyrgios was able to get in touch with the ball boy, who accepted the apology and the offer of a racket, and posted their exchange on social media.

READ: UK government wants assurances that Daniil Medvedev is not a supporter of Vladimir Putin

During one of his service games, Kyrgios hilariously brought the watching Ben Stiller into an exchange he was having with a fan.

“Are you playing? Are you good at tennis?” Kyrgios asked the man in the crowd behind him. “Exactly, why are you speaking?”

He then pointed at Stiller and said: “Do I tell him how to act? No!” which drew laughter from the stands.

After the match, Nadal told reporters he hadn’t seen the incident with the racket, but said “the ATP should review things and make decisions” if these incidents continue to happen.

Last week, Nadal called for tougher punishments for players after Alexander Zverev received only a suspended eight-week ban for his petulant outburst in Acapulco, Mexico last month.

Zverev smashed his racket multiple times near the umpire’s feet after his doubles defeat and called the umpire a “f***ing idiot” during the match.

Rafael Nadal will face compatriot Carlos Alcarez in the semifinals.

“I like him [Kyrgios] like a character, but of course when you cross some lines then the thing becomes different,” Nadal told reporters after the match. “The problem is, in my opinion, the same. When you allow the players to do stuff then you don’t know when the line is.

“It’s a tricky thing, but probably because these situations are happening more and more often, probably the ATP should review things and make decisions. Not about today’s match because I didn’t see what happened, so I can’t have an opinion.

“I hope nothing too bad happened because I wish him [Kyrgios] the best … but if it’s bad, the ATP need to make decisions to avoid that and to stop that because sometimes, even if it’s very unlucky or unfortunate, going right in that moment that something negative will happen.”

Up next for Nadal is 18-year-old Spanish sensation Alcaraz, who defeated defending champion Cameron Norrie in straight sets.