TOKYO — The International Olympic Committee is "very confident" the Olympics can take place in Tokyo next summer with a reasonable number of spectators, thanks to the development of vaccines and rapid coronavirus testing, IOC President Thomas Bach said Monday.

If vaccines are approved, the IOC also wants to “convince” foreign athletes and spectators to be vaccinated before coming to ­Japan, he said, but it can’t make immunization obligatory.

“In order to protect the Japanese people and out of respect for the Japanese people, the IOC will undertake great effort so that as many as possible — Olympic participants and visitors — will arrive here vaccinated, if by then a ­vaccine is available,” Bach said. “This makes us all very confident that we can have spectators in the Olympics stadium next year and that spectators will enjoy a safe environment.”

International Olympic Committee President Thomas Bach briefly confronted a small group of Olympics protesters in Tokyo, Nov. 16. (Reuters)

Bach spoke on the first day of a three-day trip to Japan, where he met with Prime Minister Yoshihide Suga, former prime minister Shinzo Abe, Tokyo Gov. Yuriko Koike and the leaders of the Tokyo 2020 organizing committee.

The Games are scheduled to begin July 23, 2021, after they were postponed for a year in March near the onset of the pandemic.

Bach also hailed successful test events held in Japan in recent weeks, including an international gymnastics meet and domestic baseball games held in front of tens of thousands of fans in almost full stadiums, as evidence that sports can still take place safely despite the pandemic.

“And now we are nine months ahead of the Olympic Games, and based on this success, we can even be more confident — because in nine months from now, we know that we will even have more covid countermeasures in our toolbox than we have now,” Bach said, referencing the disease caused by the coronavirus.

Bach cited recent progress in developing a vaccine against the virus, and he said rapid virus testing was also improving and could be a useful tool in protecting people at the Games.

Last week, Japan staged a gymnastics event in Tokyo involving competitors from China, Russia and the United States, as well as the host nation, in front of about 2,000 fans.

Gymnasts had to submit to strict rules, including a two-week quarantine before entering the country and daily coronavirus testing. Aside from the competition and training, they were confined to their hotel rooms and even escorted to meals on the premises. But no cases of virus transmission were detected, and organizers and competitors said the experience had been worthwhile.

Some baseball games have also been held in practically full stadiums in recent weeks as experiments ahead of the Olympics, although for most games, spectator numbers are limited to 50 percent of capacity.

Fans are required to wear masks, are banned from cheering or shouting to avoid virus transmission and are asked only to clap — restrictions that could be unpopular and tough to enforce among foreign crowds if imposed at the Olympics.

Japan says athletes will be exempt from having to undergo a 14-day quarantine on arrival in the country and admits it won’t be able to force foreign spectators to quarantine or avoid public transportation, raising the risks of virus transmission in the absence of mass vaccination. But a final decision on whether to allow in foreign spectators, and from which countries, has yet to be made.

Bach noted that it was unclear whether stadiums could be full for the Games but said he was confident that a “reasonable number” would be able to attend.

“We all have to understand that the people in the world are living in uncertainty,” he said. “What we are saying is we are living in a dark tunnel, and the Olympic Games next July and the Paralympic Games next August, they can be the light at the end of this tunnel.”