An Illinois court has upheld a ruling that Heidi Zamecnik should be permitted to wear a T-shirt bearing the slogan “Be Happy, Not Gay”.

Zamecnik originally wore the shirt during a Day of Silence at her school, which had been intended to promote tolerance, according to reports by the Chicago Tribune.

The school’s dean, just outside Chicago, at first suggested the student to the slogan to “Be Happy, Be Straight”.

When a female counsellor was asked, she recommended removing the second line altogether in favour of the phrase “Be Happy”.

However, the US Court of Appeals for the Seventh Circuit statement ruled the T-shirt is legal in its original form, saying: “A school that permits advocacy of the rights of homosexual students cannot be allowed to stifle criticism of homosexuality.”

“People in our society do not have a legal right to prevent criticism of their beliefs or their way of life.”

It judged that wearing anti-gay slogans was acceptable, so long as the school could not prove such an act would cause disruption.

Judge Posner wrote: “There were no serious incidents, though it is possible that a water bottle that was thrown and struck one of her friends had been aimed at her.”

He also made reference to a Facebook group, titled “Be Happy! Not Heidi”, calling the discussion on freedom of expression therein, which was overwhelmingly negative in its judgment of Zamecnik and the law suit, “substantive and even, to a degree, thoughtful”.

Two students, including Zamecnik, argued that, so long as they were not breaching the peace, any form of clothing was acceptable.

Nate Kellum, senior counsel for the Alliance Defence Fund which represented the pair said: “Christian students shouldn’t be discriminated against for expressing their beliefs.”

The two students have since graduated, but the ruling applies for future attendees.