It wasn’t only a headache.

Team Sweden star Nicklas Backstrom violated the Olympics anti-doping rules and thus was banned from representing his country in the gold medal game.

The centreman was reported to be scratched from Sunday’s showdown versus Canada due to a migraine, but he was not permitted to play after he tested positive for a banned substance, as first reported by Yahoo!’s Greg Wyshynski.

“I have absolutely nothing to hide. I’ve had allergy problems for several years,” Backstrom told reporters after the game.

Backstrom said he tested positive for a banned substance on Wednesday but was only told about the negative result two hours before Sunday’s game.

“It was a shocking message to get,” backup goalie Jhonas Enroth told the Swedish news agency TT after the final. “We found out two hours before the match.”

The Swedish players were told about Nicklas Backstrom's situation only minutes before puck drop, per captain Nicklas Kronwall. — Chris Johnston (@reporterchris) February 23, 2014

An NHLPA source told Yahoo! Sports that Backstrom violated anti-doping rules after using an allergy medication. Pseudoephedrine, which is used in some allergy remedies, is a substance banned by the IOC and the World Anti-Doping Federation.

Backstrom has been taking one allergy pill a day for several years, including during the 2010 Winter Games, according to the Swedish team doctor.

Backstrom, who had four assists in Sweden’s first five games, was pulled from the dressing room before Sweden’s pregame skate, after being listed on the official starting lineup sheet.

Backstrom would have been his country’s top-line centre Sunday, with Sweden’s Henrik Sedin and Henrik Zetterberg already lost to injury.

Canada won the game 3-0.

After the game, Team Sweden’s head coach and general manager lashed out at the IOC for its decision on Backstrom:

Par Marts on Nicklas Backstrom: "It sucks, it's like kindergarten. I think we should have the right conditions to compete against Canada." — Chris Johnston (@reporterchris) February 23, 2014

Swedish coach Par Marts says that the IOC has "made things up here" regarding its decision on Nicklas Backstrom. — Chris Johnston (@reporterchris) February 23, 2014

Swedish GM says the IOC has "destroyed" one of the greatest hockey days in his country's history by ruling Nicklas Backstrom out. — Chris Johnston (@reporterchris) February 23, 2014

On behalf of the NHL, deputy commissioner Bill Daly released the following statement regarding Backstrom’s failed test Sunday:

“We understand that Nicklas Backstrom tested positive for a substance banned ‘in competition’ by the International Olympic Committee. It is our further understanding that the positive test was the result of a common allergy medication taken by the player knowingly, with the approval of the team doctor and without the intention of gaining an illegal or improper performance-enhancing benefit. In addition, the specific substance that resulted in the positive test is not currently on the League’s Prohibited Substances List.

“Subject to confirmation of the facts as we understand them, and given the fact that the substance is neither prohibited in the NHL nor was used in an improper manner here, we do not anticipate there being any consequences relative to Nicklas’ eligibility to participate in games for the Washington Capitals.”