LAGOS DE MORENO, Mexico -- With one swing of the bat, Jimmy Van Ostrand drove in the only two runs Canada needed to beat the United States 2-1 Tuesday and win the gold medal at the Pan American Games.

Van Ostrand stepped up to the plate with two men on base in the top of the sixth inning and doubled down the right field line to bring in Chris Robinson and Tim Smith. Both Robinson and Smith had two-out singles to start the rally.

"We've finally accomplished what we set out to do," said Canada manager Ernie Whitt, a 15-year major league player. "I am so proud of these guys. They've worked so hard for this and didn't give up."

The gold was Canada's first at the Pan American Games, a competition that has been dominated by Cuba for 40 years. The Cubans had won 10 straight titles until the United States defeated them 12-10 in Monday's semifinals. They instead had to settle for bronze.

Canada beat Mexico in the other semifinal to get a chance at gold, and they didn't let the chance slip away.

Andrew Albers started for Canada and gave up six hits while striking out eight through 6 2/3 innings. Scott Richmond came on in relief and shut down the Americans, striking out three of the seven batters he faced without surrendering a hit.

"Our guys played their hearts out," U.S. manager Ernie Young said. "I wanted so bad for those guys to win a gold medal. We just came up one run short."

The Americans took a 1-0 lead in the bottom of the first inning at the Pan Am Baseball Stadium. A.J. Pollock singled through the right side with one out and advanced to second on a passed ball with two down.

Brett Carroll then doubled down the left field line to bring in Pollock and give the U.S. an early lead.

Andy Ven Hekken pitched seven innings for the Americans, and gave up both runs on six hits. Jeff Beliveau pitched the eighth, giving up one hit, and Pete Andrelczyk came on in the ninth.

"In every international baseball tournament there is a surprise team that comes out, plays their heart out and wins the event," Young said. "Canada played unbelievably throughout the tournament. They only lost one game.

"You only lose one game, you deserve to win."

The U.S. men's volleyball team's also came up short Tuesday, squandering 11 match points in the fourth set and then losing 3-2 to Canada in a first-round match.

"Obviously it was a very close match, with two sets going extra innings," U.S. captain Evan Patak said. "It's really frustrating for me and the guys because we were close and had opportunities to seal the victory. Canada played well down the stretch. It's a difficult loss to swallow."

After the teams split the first two sets, the U.S. won the third 39-37 and Canada took the fourth 35-33. The Canadians closed out the victory by winning 15-12 in the fifth set.

Antonio Ciarelli led the Americans with 30 points, while Canada got 36 from Spencer Leiske.

"I'm happy with the way the guys fought. I'm disappointed with the loss of course," U.S. coach John Speraw said. "We came here to get some experience, and with the number of points we played tonight, we certainly got some experience."

With the Mexican crowd on its side, Canada closed the third set with a block by Kyle Caldwell after 42 minutes and four wasted set points. The U.S. also had 11 set points in the third before eventually winning it.

In the fourth, Canada had only two set points against the 11 of the U.S., but it made the most out of it.

"USA played pretty well," Canada captain Louis-Pierre Mainville said. "We did, too."

The United States now needs to beat Brazil on Wednesday to advance from the group stage. It will be a rematch of the 2008 Olympic final won by the Americans in Beijing, although both teams have changed significantly since then.

"If you analyze how we handled the situation as a team and as players, there is a lot we can take from this to use to our benefit," Patak said. "That will be very important, especially with the young age of our team. Mentally you have to get over it, but at the same time you have to learn from your mistakes."

In total, the United States won four more gold medals on Day 11 of the Games, two in fencing and two in bowling. The women's water polo team also beat Cuba 19-3 to clinch first place in Group B and set up a semifinal game against Brazil.

The Pan American champions earn a qualifying spot at next year's London Olympics. The Americans have won two of the three titles in the sport at the Pan Am Games, including the most recent.

"It's been our goal to come here, play well and get that Olympic berth early," said U.S. captain Brenda Villa, who already owns two Olympic silver medals and one bronze. "It's not going to be easy. It's something we're going to have to go out and earn."

Tuesday's rout was the Americans' third straight in the group stage, setting up the showdown with Brazil.

"They're a team that has a lot of heart and plays with a lot of spirit," Villa said of the Brazilians. "We're just excited to keep going and get that Olympic berth."

Not everyone will get a chance to play at the Olympics, however, so the Pan American Games serve as the highlight of multi-sport competitions. That is certainly the case in bowling, where Bill O'Neill and Chris Barnes won the men's doubles gold and Kelly Kulick and Liz Johnson won the women's doubles.

"It's the closest thing we're ever going to see to getting to the Olympics," Kulick said. "So for us it's an honor to represent our country and feel that we can represent our sport very well back in the States."

Ivan Cambar of Cuba won the first gold on Day 11 of the Pan American Games, taking the men's 77-kilogram weightlifting title.

Information from The Associated Press was used in this report.