Morgan Rielly, right, was cleared of using a homophobic slur. (Darryl Dyck/The Canadian Press via AP)

An NHL investigation on Tuesday found that a Toronto Maple Leafs player did not direct a homophobic slur toward a referee during Monday night’s game against the Tampa Bay Lightning at Scotiabank Arena in Toronto.

A rink-side microphone picked up a profane anti-gay remark in the second period of Tampa Bay’s 6-2 win. The Lightning successfully cleared the puck out of its zone as the statement was heard on Sportsnet’s broadcast. Toronto defenseman Morgan Rielly appeared upset with referee Brad Meier over a play in the offensive zone, and was facing Meier when the remark was heard.

But the league cleared Rielly of wrongdoing Tuesday afternoon.

“Following a thorough investigation, the National Hockey League has determined that Toronto Maple Leafs defenseman Morgan Rielly did not direct a homophobic slur at referee Brad Meier during last night’s game with the Tampa Bay Lightning at Scotiabank Arena,” the league wrote in a tweeted statement.

“League officials interviewed several of the participants in the game — including Rielly and Meier — and reviewed audio of the alleged incident,” the statement continued. “All of those interviewed denied that Rielly uttered a slur and the audio supported their statements.

“The National Hockey League does not tolerate language or gestures that disparage anyone based upon their race, creed or sexual orientation and continues to work to ensure that our games are played in a welcoming atmosphere for all of our players, coaches, officials and fans.”

Maple Leafs General Manager Kyle Dubas said Monday night that the team was “cooperating fully” with the league’s inquiry and that it “strongly condemns” homophobia.

Toronto has been one of the NHL’s more active clubs supporting the “You Can Play” movement, which seeks to eradicate homophobia in sports. The team hosted a “You Can Play Night” on Feb. 25, when players appeared in a public service announcement denouncing homophobia, racism and sexism in hockey.

The NHL has been inconsistent in handing down penalties for homophobic behavior. Then-Blackhawks forward Andrew Shaw was banned for a playoff game in 2017 and fined $5,000 after using a slur in the penalty box. Later in the playoffs that year, though, the league did not suspend Anaheim Ducks center Ryan Getzlaf, and fined him only $10,000 for directing an anti-gay remark at an opponent.

Read more from The Post:

Russell Westbrook alleges ‘racial’ comments prompted threats to Utah fans

FloSports offers full refunds after rough debut, vows to win back D.C. United fans’ trust

2019 NFL free agency: Early winners and losers

Conor McGregor arrested after allegedly stomping on man’s phone near Miami club