The Montreal Canadiens have apologized after tweets containing racial slurs ended up on their Twitter feed Tuesday night.

To thank fans for reaching one million Twitter followers, the NHL team encouraged users to reply to a tweet with the hashtag #CanadiensMTL1M, and they would then receive a surprise.

Some responses to the hashtag featured pictures of a customized jersey bearing Twitter handles where a player's name would normally appear while others contained a thank you video from Habs players.

Story continues below advertisement

However, some pictures of the customized jerseys portrayed Twitter handles with racial slurs and other vile comments.

The Habs later posted a message on their feed saying they apologize for the "offensive messages" and said they have "fixed the issue so it won't happen in the future."

Many of the automated tweets have since been removed.