SOCHI, Russia — Ted Nolan admits he wasn’t the most attentive observer when he began scouting Latvian pro hockey games after becoming the national coach in the summer of 2011.

“I was more excited watching the fans than the players,” Nolan said. “It was interesting for me, as a First Nation” Ojibway Indian, “to see people in the stands with headdresses and war paint on their face. I’ve never met a native over there. I don’t know where it started, but they wear regalia.

“It’s a hockey-crazed country. They just love the game. If the players played with as much energy as the fans, they would be a world power.”

Latvia, a Baltic nation of 2 million, is no world power. But no team does more with less, or has such a devoted following. The Latvian fans flock to the games in their maroon-and-gold, chanting and blaring horns, pounding drums, then heading out to celebrate peaceably in the streets afterward, win or lose.

Next week, Latvia will compete in its fourth straight Olympics. They’re a huge underdog. Latvia’s most renowned player is Sandis Ozolinsh, a former NHL star defenseman. He’s 41. Their best current NHL player is Sabres rookie Zemgus Girgensons, who is 19. They have a handful of players who had brief careers in the NHL. Most are in the KHL, the pro league based in Russia.

Latvia has never reached the quarterfinals of an Olympics. They won a ninth-place game in 2002 and went winless in ’06 and ’10. Four years ago, they were outscored, 19-4, in three preliminary games, then lost in overtime in the qualifications to finish 10th out of 12 teams.

But Nolan is no stranger to challenge. This is a guy who grew up poor on a reservation in Canada, without running water, convinced he would one day play in the NHL. As a kid, he pumped well water in minus-20 degree weather to make his own ice rink.

So when Latvia came calling, Nolan was all ears. He still had coaching in his blood. But that poor kid from the reservation had one driving motivation:

“To go the Olympics is every kid’s dream,” Nolan said last week. “That was the main reason why I went there. That was the drawing card for me.”

First, they had to qualify. Latvia wasn’t among the top nine in the world rankings, the automatic qualifiers. They had to win a four-team tournament (with Great Britain, France and Kazakhstan) to get in, which was held in the Latvian capital of Riga.

They won the first two and needed only a tie against France in the final game to make it. They fell behind, 2-0, but rallied to force OT and earn the bid. It was bedlam at the end, with people waving flags and weeping and chanting “Lat-via!” as a joyous Nolan hugged his coaches and players along the bench.

“I know the celebrations they had over there because of what the hockey team did,” said Pat LaFontaine, the Sabres’ president. “Teddy was a big part of that. He’s looked upon in Latvia like Bobby Valentine was in Japan when he won the championship. They had a parade and honored Ted.”

Nolan was in Germany in November, returning from an exhibition series against Russia, when he got a call from LaFontaine asking him to coach the Sabres. He was so excited, he could barely speak. After saying yes, Nolan mentioned Latvia, how they’d worked two and a half years to get to the Olympics.

“You got them to this point, you should be there to see it through,” LaFontaine said. “The league is shutting down. What a great experience for you.”

“That would be great,” Nolan said. “I’d love to do that.”

So Nolan will be behind the bench next Wednesday when Latvia plays Switzerland in a Group C preliminary. The Swiss are the lowest-ranked of the automatic qualifiers. The other teams in Group C are the Czechs and Sweden, ranked third and fourth in the world.

“I believe in miracles, I really do,” Nolan said, smiling. “If you look at the ’80 Olympics … ”

The U.S. win over the Soviets was the “Miracle on Ice,” the inspiration for movies and books. But those were simpler times, before the tournament was open to the actual pros. Many of today’s rosters are stacked with NHL stars. Latvian winning would be a true fairy tale.

“It would probably be bigger than (1980),” Nolan said. “But we don’t have a bad team. We actually have a pretty good team.”

“If we go far, it’s definitely a miracle,” said Girgensons, expected to be on Nolan’s top line. “But tournaments like this, anything can happen. It’s not an 82-game season. Every game we’ve got to think we’re going to win. Maybe we need a little bit of luck. A goalie gets hot.”

Latvia has a hot goalie. Kristers Gudlevskis, 21, was the 124th pick in last year’s NHL draft by Tampa Bay. Gudlevskis, the second-ever Latvian goalie draftee after Arturs Irbe, has four shutouts for the Syracuse Crunch of the AHL. He was AHL player of the week on Jan. 12.

Nolan hadn’t announced a starter as of last week. Edgar Masalskis, 33, is a two-time Olympian. But Gudlevskis went 2-2 in last year’s World championships, and Nolan said he’s a goalie on the rise.

“I don’t expect anything,” Gudlevskis said by phone from Syracuse. “I just want to be in shape and ready, then we will see how it goes. It goes game by game. You never know what happens in Olympics. It’s about opportunities and what you make of them.”

Latvia has a fair chance to reach the quarterfinals for the first time. Their fans will travel south, from the Baltic to the Black Sea, ready to cheer their every move, thrilled to be part of it all.

“The odds aren’t with them,” LaFontaine said. “The fact they’re there is a great testament to Latvia. There are some high-powered nations that should handle them pretty easily. But I know that Teddy as a coach will get everything out of those players, and they will play for him.

“You can never underestimate the heart of a Latvian, as we found with Girgensons. If they all have that same fire and passion for the game, watch out.”