Nick Kyrgios has issued an apology after a tennis racquet he smashed into the ground bounced and nearly hit a ball boy following his Indian Wells loss to Rafael Nadal.

The ball boy was able to duck out of the way and Kyrgios was then booed by some in the crowd following the 7-6 (7-0) 5-7 6-4 quarter-final defeat in California on Thursday.

“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.

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

“My racquet 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 later used social media to track down the ball boy, who accepted the apology, saying he was “completely fine” and looking forward to getting his hands on a racquet.

The 26-year-old Kyrgios was initially defensive when asked about the incident after the match, berating a reporter for focusing on it after a blockbuster match.

“What would you like me to say about it?,” he said. “Obviously, was that my intention? No. Because I threw the racquet. Did I throw the racquet anywhere near him originally? It landed a metre from my foot and skidded and nearly hit him.

“I’m human. Things happen like that. Obviously it was a very misfortunate bounce. I think if I did that a million times over it wouldn’t have gone that way.”

Nadal said last week that the sport needed to impose stiffer penalties to curb outbursts, after Alexander Zverev received one-year probation – but no immediate suspension – following an expletive-filled tantrum in Acapulco

The 24-year-old German Olympic champion apologised after he was defaulted for “unsportsmanlike conduct” after he smashed his racquet against the umpire’s chair and verbally abused him.

“Because this situations are happening more and more often, probably ATP should review things and make decisions,” Nadal said after Thursday’s match.

“Not about today’s match because I didn’t see what happened in the end, so I can’t have an opinion … I hope nothing too bad happened because I wish (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.”