OTTAWA -- The Conservatives are cracking down on johns and pimps because legalizing their activities would be unacceptable to Canadians, says Prime Minister Stephen Harper.

In defending new government legislation on prostitution, Harper said Monday that activities related to the sex trade are outlawed because they are harmful to women and society in general.

"They are not harmful because they are illegal," Harper said. "They are illegal because they are harmful."

Legislation introduced this month would, if passed, criminalize the purchase of sexual services, take aim at those who benefit from prostitution and outlaw the sale of sex near places where children gather.

The new prostitution-related offences are intended to reduce demand for sexual services, shield sex workers from exploitation, and safeguard children and communities.

The legislation is the government's response to a Supreme Court of Canada decision in December that struck down chief elements of the country's prostitution laws.

Under the old laws, prostitution itself was actually legal but almost all related activities -- including communicating in a public place for the purposes of prostitution, pimping and running a brothel -- were criminal offences.

The Supreme Court was concerned that the provisions unduly increased the risk to sex workers, declared them in violation of the Charter of Rights, and gave Parliament a year to ponder the situation.

Some critics, including the NDP, say the proposed law introduced last week is deeply flawed and likely unconstitutional because it does not adequately protect women, failing to meet the court's primary concern.

During question period Monday in the House of Commons, NDP deputy leader Megan Leslie accused the government of putting politics ahead of competence.

"Instead of reducing the risks that women face, the bill risks entrenching extremely problematic aspects of the old legislation," Leslie said.

Since the bill's introduction, the government has repeatedly rejected the idea of asking the Supreme Court to rule on its compliance with the charter.

MPs will soon have a chance to debate the bill, said Bob Dechert, parliamentary secretary to the justice minister.

"It is for the government to propose legislation. It is for Parliament and all of its members to debate that legislation," Dechert said during question period.

"In our view it meets every test of the Supreme Court decision."