The United States women’s softball team celebrated after winning the gold medal at the 2004 Athens Olympics. Softball is one of six sports that will rejoin the Olympic program in Tokyo in 2020.CreditBarton Silverman/The New York Times

RIO DE JANEIRO — Baseball and softball will return to the Olympics in Tokyo in 2020, but there is no guarantee the sports will remain beyond that year.

Four other sports — karate, skateboarding, sport climbing and surfing — will also be a part of the program in Tokyo. The International Olympic Committee formally approved the additions on Wednesday.

Beginning with the 2020 Games, each Olympic host can propose adding sports with national appeal. The I.O.C. has also been eager to attract younger audiences and hopes that sports like skateboarding and surfing will do so.

Skateboarding and sport climbing could take place in the heart of Tokyo and would not require the construction of permanent stadiums.

Still, the additions are only for 2020. Whichever city earns the right to host the Summer Games in 2024 will be able to propose sports of its own, which could be different and could replace some or all of the new sports set for Tokyo.

Baseball was added to the Olympic menu in 1992, with softball following in 1996. As the Olympics have brought in more and more top athletes in sports like tennis, baseball suffered because the best players, in the major leagues, did not participate. The sport was dropped after 2008. Although the world’s top players did participate in the softball tournament, the sport left the Olympic program at the same time.

The return of softball could be a gold medal opportunity for the United States, which won the first three Olympic softball tournaments, compiling a record of 24-4 before being upset by Japan in the 2008 final.

Cuba won three of the five baseball gold medals. The United States won one gold medal, in 2000, and two bronzes.

Before the vote on Wednesday afternoon, some Olympic officials expressed concerns that Major League Baseball might not release top American players to participate in the Games. “We’ve achieved agreement with all the other professional” leagues, said Riccardo Fraccari, president of the International Baseball Federation. “We’ll be sure to present the best athletes.”

More on other sports chosen in rest of link..