Takefusa Kubo scored the winner as Japan edged past South Africa 1-0 in their men's football opener at the Tokyo Olympics on Thursday, the match going ahead after enough South African players cleared COVID-19 protocols before the game at an empty Tokyo Stadium.

Japan, looking to eclipse their best result of a bronze medal at the 1968 Mexico City Olympics, struggled to find the final touch in the Group A encounter, but the 20-year-old Real Madrid playmaker broke the deadlock when his powerful effort from inside the box found the net in the 71st minute.

Japan's Takefusa Kubo (R) scores during the second half of a Tokyo Olympic men's football Group A match against South Africa on July 22, 2021, at Tokyo Stadium in the capital. (Kyodo)(SELECTION) ==Kyodo

"I'm really relieved at this moment, I feel joy and equal amounts of relief," Kubo said. "I'd had a few shots during the game and I knew it would be me if there was one player to score."

"There were lots of things written before the game, but as it turned out, they were as good a team as we'd thought. We struggled, and deservedly so."

The game was in jeopardy when a total of 18 South African players were identified as close contacts after two of their teammates and a video analyst tested positive for the coronavirus on Sunday, the first confirmed cases among Olympic teams at the athletes' village.

FIFA requires at least 13 players to be registered from each side for a match to be played and players deemed close contacts at the Olympics need to test negative within six hours of the start of a match in order to take part.

South Africa head coach David Notoane on Wednesday said 17 players trained and the same number of players were registered for the game, one short of the maximum allowed 18.

Kubo had a penalty shout turned down after 20 minutes when he was seemingly tripped inside the box. Then, a misplaced pass from the South African backline had Koji Miyoshi through on goal down the left but his shot was deflected by keeper Ronwen Williams in the 32nd minute.

With halftime approaching, lone Japan striker Daichi Hayashi tapped home a low cross from Ritsu Doan but was ruled offside. A moment later, Kubo sent a free kick inches wide as a frustrating half came to an end.

Hajime Moriyasu's men shifted gears after the break but failed to take their chances before Kubo stepped up, controlling a cross-field ball down the right and cutting inside before unleashing a low drive that found the net off the left upright despite Williams getting a slight touch.

South Africa had first real look at goal in the 77th minute but Luther Singh's low effort from inside the box was straight at keeper Kosei Tani.

Japan celebrate after beating South Africa 1-0 in a Tokyo Olympic men's football Group A match on July 22, 2021, at Tokyo Stadium in the capital. (Kyodo) ==Kyodo

"We were a bit timid on the whole in the first half...We can do a lot more and play more confidently from start," captain Maya Yoshida said.

"It'd have been better to have some supporters in such a good stadium, but I'm sure 100 million fans are supporting us (at home)."

The veteran defender lamented the uncertain buildup for the teams but said he believes the fact the game finally went ahead was a "key point" for the Olympic tournament.

Mexico, Japan's opponent on Sunday, beat France 4-1 in the other Group A game.

Eduardo Aguirre of Mexico scores his side's fourth goal in an Olympic match against France on July 22, 2021, at Tokyo Stadium. (Kyodo)

Related coverage:

Olympics: Young Japan football star Kubo brings talents to global stage

More South African Olympic soccer players deemed close COVID contacts

2 South Africa soccer players at athletes' village positive for COVID