Canada secured the Olympic berth by being the only undefeated team at the four-country tournament.

After the final point was scored Canadian players swamped the floor. There were hugs and handshakes.

An exciting 3-2 win over Cuba Saturday night put Canada in the driver’s seat heading into the final day of the three-day competition.

The men’s Olympic dream looked in peril after they dropped the first two sets against 18th-ranked Cuba by identical 25-22 scores. They averted disaster by winning the next three sets 25-12, 25-21 and 15-9.

Cuba defeated Mexico 3-1 in Sunday’s other game.

With their tickets to Tokyo in their grasp, the Canadians put on a steady performance against Puerto Rico. There were some flashy spikes and big blocks, but mostly Canada was methodical. The Puerto Ricans were never really out of any of the sets but didn’t threaten either.

Canada found itself trailing 4-1 early in the first set. After some opening nerves the Canadians settled down and built a lead they didn’t relinquish.

In the second set the men led by as many as 10 points while cruising to an easy victory.

Despite being down 2-0 Puerto Rico refused to go down without a fight in the third set. The Puerto Ricans kept the game close until the Canadians reeled off seven straight points for a 16-9 lead.

The Canadian men qualified for the 2016 Rio Olympics after an absence from the Summer Games of almost a quarter-century. The 12th-seeded Canadians bowed out to Russia in the quarterfinals.

While the Canadian men are heading to Tokyo, the women’s team failed to qualify during a tournament in Santo Domingo, Dominican Republic.

Five Canadian teams — men’s and women’s rugby sevens, women’s softball, men’s field hockey and women’s water polo — have already qualified for the Tokyo Olympics. That matches the previous high of a non-boycotted Games — excluding the 1976 Olympics in Montreal when the country sent nine teams as a host.

Besides the volleyball squads, basketball and soccer teams also have a chance to punch their tickets to Tokyo.