But within moments, the stunned crowd began cheering for Meghan Duggan and the US team. It was a heartbreaking loss after a stunning Canadian rally. But Duggan, a star forward who grew up in this North Shore town, had done them proud.

JoAnn Marshall, another family friend, was saddened by the loss, but said there was no shame in a silver medal.

“We’re so proud of her,” she said.

Fans also gathered to watch the gold medal game at a hockey rink in Bedford, where the US team had trained in the months before Sochi.

During their training, many US players lived with families from the area, to the delight of young star-struck hockey fans.

“It’s been so cool following her,” Carmen Braceras, 15, said of defenseman Megan Bozek. “She’s like part of the family.”

‘They became part of the community. I think our kids took a lot from that.’

Braceras, who lives in Concord, said that Bozek stayed in a guest room and that they often hung out together and watched television. Bozek also helped Braceras, who hopes to play hockey in college, work on her game.

“She has an amazing slapshot,” Braceras said.

Scores of fans gathered at the rink for the big game, mostly players from the East Coast Wizards, a youth hockey program, and their parents.

Barry Chin/Globe Staff

US fans reacted to third-period action on TVs showing the game between the US and Canadian women’s teams in Sochi. In left foreground is Katie Duggan, sister of a player.

Scott Fusco, who runs the Wizards and the rink where they play, said the US team regularly practiced at the facility and became role models to the youngsters.

“They became part of the community,” he said. “I think our kids took a lot from that.”

During the second period, the crowd burst into cheers as Duggan scored, giving the US team the lead. Sitting on a beanbag in front of the mounted television set, a group of young girls hugged in joy.

Kinley Miller, 13, was just 2 when she learned to skate, and now dreams of playing on the Olympic hockey team one day. She knows it is ambitious, but she would like to make the next Olympic team. That way she could play alongside current Olympian Hilary Knight, who stayed with her family during training.

“That would be so cool,” Miller said, eyes wide. She had followed the team through the Olympics, and was rooting for Knight most of all.

On her middle school team, Miller is the only girl. Turns out, the same was true for a lot of Olympians, she said, who told her that it’s good to play with boys. “You got better that way,” Miller said.

Jessica DiPietrantonio, 10, said she had met many of the Olympians this fall and could hardly believe she was now watching them on television.