TORONTO — Canada’s Conservative government introduced legislation Wednesday that will make it illegal to buy sex and to sell it in public areas where there might be minors. The bill’s critics said it merely makes prostitutes more vulnerable.

The proposed law is Prime Minister Stephen Harper’s response to the highest court striking down the country’s anti-prostitution laws last year.

The court, which ruled in a case brought by three prostitutes, struck down bans on keeping a brothel, making a living from prostitution, and street soliciting. The Supreme Court ruling upheld an Ontario Court of Appeal ruling that, among other findings, struck down the ban on brothels on the grounds that it endangered sex workers by forcing them onto the streets.

The ruling didn’t take effect, however, because the court gave Parliament a year to respond.

Justice Minister Peter Mac- Kay said the new law would target pimps and “the perverts.”

“We are criminalizing the purchase of sexual services and in very specific instances the sale in areas where young people under the age of 18 could be present,” MacKay said.

He suggested the courts would ultimately interpret the circumstances under which someone could be charged for selling sex near minors, and said the police would have discretion to act.

The law also would ban advertising the sale of sexual services in print media or on the Internet.

Angela Campbell, a law professor at Montreal’s McGill university, said the proposal does little to protect sex workers and is merely an opportunity for the Conservatives to push their law and order agenda.

“The crime of purchasing and advertising sex services, those were not offenses before, and they are now,” she said. “It will allow for greater use of police resources, the courts and the prison system to get on this sort of tack that the Conservatives have been on since day one, which is essentially to ensure there is sort of a moral order in place.”

Emilie Laliberte, a spokeswoman for the Canadian Alliance for Sex Work Law Reform, said the new law “let down all Canadian sex workers,” and she predicted it would end up before the Supreme Court again.