Catherine McKenna's office says it did not intentionally block a youth climate action group from following her on Twitter because of inappropriate language.

Climate Strike Canada, a network of young people inspired by Swedish climate activist Greta Thunberg, said it was blocked from the environment minister's official Twitter account late Monday evening.

The block came after McKenna — who is running for re-election — ​​​​congratulated the group on Twitter for their activism, saying that Canadians have a moral obligation to future generations to listen to them.

That prompted a testy response from one of the users of Climate Strike Canada's Twitter account referring to the minister as "Cathy" and telling her to "stfu" — an acronym for the phrase "shut the f--- up" — because her government backed the purchase of the Trans Mountain pipeline.

David Taylor, McKenna's campaign spokesman, told CBC News that the group was then blocked by mistake. As soon as the office was made aware of it, the block was reversed, early Tuesday evening, he said.

Cathy... stfu You 👏 bought 👏 a 👏 pipeline <a href="https://t.co/XBldWAzLCt">https://t.co/XBldWAzLCt</a> —@canada_strike

Climate Strike backs the weekly international protest inspired by Thunberg that encourages young people to walk out of school on Fridays as a call for urgent climate action.

Thunberg will be in Montreal on Friday for a climate strike rally there, one of several such protests planned across the country.

Emma Lim, Climate Strike Canada's Ontario co-ordinator, said she wasn't sure who published the offending tweet, because the account has many users, some of them in elementary school.

"In the future, we will use more appropriate language," she said.

Lim said that her group did not specifically reach out to McKenna over being blocked, choosing instead to respond on Twitter.

No idea how this happened but fixed. I agree that we need to listen to young people on climate! —@cathmckenna

McKenna has come in for a significant amount of verbal abuse and threatening behaviour in her role as environment minister. The threats have been judged real enough that the minister sometimes requires a security detail.

"I think it is horrific that Catherine McKenna is receiving threats," said Lim. "We are students, we are also receiving threats and it's a scary situation to be in, but so is the climate crisis."