David Bahati, the Ugandan MP who tabled a bill calling for gays to be jailed or executed, says he is confident his bill will soon become law.

Speaking to CNN, he said: “We are very confident because this is a piece of legislation that is needed in this country to protect the traditional family here in Africa, and also protect the future of our children.”

The bill, which shocked gay rights campaigners and even led to Sweden threatening to withdraw aid from Uganda, was thought to have been shelved after it was introduced last October.

It demanded the death penalty for people convicted of gay sex with minors or while HIV-positive and lengthy jail sentences for others.

Friends, family members and co-workers of gay people would also face punishment for refusing to report cases of homosexuality.

Mr Bahati said he was still working for it to become law.

He added: “Every single day of my life now I am still pushing that it passes.”

Uganda came under scrutiny again this month for its attitude to homosexuality after a newspaper published a list of gays and lesbians.

Rolling Stone, which has no relation to the US magazine, published their names, photos and addresses, with a banner urging “hang them”.

Gay rights campaigners say that at least four of those on the list have been attacked, while others have been forced into hiding.

According to reports, one woman was almost killed when neighbours pelted her home with stones.

Giles Muhame, the managing editor of the newspaper, defended his story, saying it was his duty as a journalist to “expose the evil in our society”.