A court has backed US retail giant Wal-Mart for sacking an anti-gay worker who claimed she was a victim of discrimination for being a Christian.

Tanisha Matthews was fired from her job as an overnight stocker at a store in Joliet, Illinois, in 2005 after a lesbian co-worker named only as Amy filed a complaint against her.

Amy claimed that during a break, Ms Matthews had screamed “over her” that God does not accept gays, that they should not exist, that they would go to hell and that they are not “right in the head”.

Five other employees confirmed that Ms Matthews said gays would go to hell and are sinners.

Ms Matthews was fired for violating Wal-Mart’s anti-harassment policies but claimed she had been discriminated against for her race and religion.

She later dropped the claim for racial discrimination but took the company to court for discriminating against her for being an Apostolic Christian.

The federal appeals court in Illinois ruled that Ms Matthews’ right to exercise her religious freedom at work did not permit her to harass gay people.

Wal-Mart fired her “because she violated company policy when she harassed a co-worker, not because of her beliefs,” the court found.

The UK has seen a number of high-profile cases around gay rights and religion in recent years.

In 2007, a Christian registrar from Islington, north London, began a legal fight after she was sacked for refusing to carry out civil partnerships. Lillian Ladele was denied leave to appeal the latest judgment by a court last year.

Last year, sex counsellor Gary MacFarlane lost his case for religious discrimination and unfair dismissal when he was sacked by Relate for refusing to treat gay couples.