Country music singer George Canyon sang "O Canada" as a large Canadian flag was unfurled at centre ice of Calgary's Saddledome.
The fans in attendance cheered in appreciation and loudly sang along with Canyon.
The pre-game ceremony was held in honour of Cpl. Nathan Cirillo, who was shot and killed on Wednesday as he stood watch at Ottawa's National War Memorial.
Gunman Michael Zehaf Bibeau was later shot and killed when he tried to enter the House of Commons.
Cpl. Cirillo was the second soldier to die in an attack this week. Warrant Officer Patrice Vincent was run down by an attacker with jihadist sympathies on Monday in Saint-Jean-Sur-Richelieu, Que.
In Boston, Rene Rancourt sang "O Canada" before the American national anthem as the Bruins hosted the New York Islanders. Also, the San Jose Sharks played "O Canada" before their game with the Columbus Blue Jackets.
Usually, "O Canada" is only sung in an American arena if a Canadian team is playing. Both Boston and San Jose dispensed with this formality as a tribute to Canada.