Labour is expected to promise in its election manifesto to overturn a ‘free speech’ amendment in a law against inciting homophobic hatred.

The law came into effect last month and will punish offenders with up to seven years in jail or a fine. It brings protections for gay people in line with laws against racial and religious hatred.

However, peers in the House of Lords were successful in adding a clause to the legislation protecting comedians who tell jokes about homosexuality or people who criticise homosexual acts from prosecution.

Labour ran out of time to attempt to overturn the amendment and the legislation passed into law last month.

Last week, home secretary Alan Johnson said that Labour would include a commitment to scrapping the amendment in its election manifesto.

He announced the plan while launching a Stonewall guide for victims of hate crime.

While Stonewall and government supporters claimed the initial legislation would not impede freedom of speech, the House of Lords, religious groups, comedians and civil liberties organisation Liberty disagreed.

The amendment, tabled by Tory peer and former home secretary under Margaret Thatcher Lord Waddington, allows the “discussion or criticism” of sexual practices.

The campaign to include the amendment was led by Blackadder and Mr Bean actor Rowan Atkinson.

He said in 2009: “Do I think that I would risk prosecution because of jokes or drama about sexual orientation with which I might be involved if we don’t have the free speech clause? Not really – but I dread something almost as bad – a culture of censoriousness, a questioning, negative and leaden attitude that is encouraged by legislation of this nature.”