Australian tennis star Nick Kyrgios confirmed his withdrawal from the Tokyo Olympics Friday, saying a ban on spectators attending the Games was a major factor in his decision to quit.

Kyrgios had already cast doubt on his participation when he pulled out of Wimbledon injured last week, despite being named in Australia’s 11-strong tennis team.

After previously complaining about quarantine restrictions at the Games, the 26-year-old said he did not want to take part if fans were not present.

“The thought of playing in front of empty stadiums just doesn’t sit right with me. It never has,” he posted on social media.

“I wouldn’t want to take the opportunity away from a healthy Aussie athlete ready to represent the country.”

Japanese officials announced the ban on spectators because Tokyo is under a state of emergency throughout the Games, as the capital attempts to contain a surge of infections.

Kyrgios, a showman who revels in his reputation for drawing energy from the crowd, said quitting the Olympics was a step he had not taken lightly.

“It’s been my dream to represent Australia at the Olympics and I know I may never get that opportunity again – but I also know myself,” he said.

Kyrgios, who is regarded as a box office draw despite being ranked 60th in the world, also pulled out of the 2016 Rio Olympics after a row with Australian officials over his behaviour.

Australia’s chef de mission for the Tokyo Games, Ian Chesterman, said this week that he would respect Kyrgios’ decision regardless of which option he took.