The proposed law would mark a return to the era of dictator Idi Amin, who banned short skirts by decree. Many Ugandans are opposed to the idea and it has spawned a Twitter hashtag, #SaveMiniSkirt.

The government-backed bill would also see many films and TV dramas banned and personal internet use closely monitored by officials.

Simon Lokodo, Uganda's ethics and integrity minister, defended the plans. "It's outlawing any indecent dressing including miniskirts," he said.

"Any attire which exposes intimate parts of the human body, especially areas that are of erotic function, are outlawed. Anything above the knee is outlawed. If a woman wears a miniskirt, we will arrest her."

Lokodo, a former Catholic priest, suggested that victims of sexual violence invited trouble. "One can wear what one wants, but please do not be provocative," he said. "We know people who are indecently dressed: they do it provocatively and sometimes they are attacked. An onlooker is moved to attack her and we want to avoid those areas. He is a criminal but he was also provoked and enticed." Asked if men would be banned from wearing shorts, the minister replied: "Men are normally not the object of attraction; they are the ones who are provoked. They can go bare-chested on the beach, but would you allow your daughter to go bare-chested?"

The anti-pornography bill contends that there has been an "increase in pornographic materials in the Ugandan mass media and nude dancing in the entertainment world". It proposes that anyone found guilty of abetting pornography faces a 10m shillings (£2,515) fine or a maximum of 10 years in jail, or both.

The likes of Beyoncé and Madonna will be banned from television, Lokodo added. "We are saying anything that exposes private parts of the human body is pornography and anything obscene will be outlawed. Television should not broadcast a sexy person. "Certain intimate parts of the body cannot be opened except for a spouse in a private place.

"A lot of photos, television, films will be outlawed. Even on the internet, we're going to put a monitoring system so we know who has watched which website and we know who has watched pornographic material."

Lokodo expressed confidence that the bill would be passed. But according to Uganda's Daily Monitor newspaper, it has run into difficulty in the parliamentary committee stage after some members expressed concern about its implications for constitutional freedoms. MPs also warned that some traditional cultural practices could be labelled as pornographic, the paper added.

Lokodo has previously courted controversy by announcing a ban on 38 non-governmental organisations he accused of undermining the national culture by promoting homosexuality. Parliament is still pondering a bill that would impose harsher penalties for gay people.

Sam Akaki, international envoy of Uganda's opposition Forum for Democratic Change, said: "This law will create an apartheid system by stealth. Whereas the former apartheid system in South Africa discriminated [against] people on the basis or race, this one will discriminate people on the basis of gender. Any law that discriminates people in any way is a bad law.

"If Lokodo or anyone in Uganda is serious about fighting immorality, they should fight corruption."