MONTREAL -- A Montreal police officer who gained notoriety under the moniker "Officer 728" after viral videos surfaced of her allegedly roughing people up was ordered Tuesday to stay out of trouble for one year and undergo psychiatric treatment.

Const. Stefanie Trudeau, who has been suspended with pay since Oct. 2, has also been ordered to stay away from any offices or members of the Montreal police force and cannot possess any firearms.

Among the reasons for the peace order was that a Montreal police officer described feeling threatened by her.

Trudeau appeared handcuffed in a Montreal courtroom but was released after signing the promise to keep the peace and agreeing to the 15-day psychiatric evaluation to be carried out at a Sherbrooke hospital.

She worked her jaw as if chewing gum while the conditions of her release were explained to her and responded in single-word affirmations that she understood them.

She left the courthouse shortly after the hearing and was to head directly for a Sherbrooke hospital where she would begin treatment.

Jean-Pascal Boucher, a spokesman for the Crown prosecutor's office, said it was decided there were no grounds for a criminal complaint but there were concerns that she still presented a danger.

"The police officer had reasonable grounds to fear," Boucher said.

She is also forbidden from visiting the police union office unless accompanied by her lawyer.

Boucher denied Trudeau got any special treatment. He said her case was moved from regular arraignment to a high-security courtroom because it was what was available by the time the case was ready to proceed.

Jean-Pierre Rancourt, Trudeau's lawyer, suggested that the order was as much for Trudeau's safety as anyone else.

He said the last few months have been hard for the police officer and her family, and concerns were raised about her mental state when she contacted the police union on Monday seeking aid.

"She needs to be supervised by a psychologist and probably some medication," Rancourt said. "It's very hard for her, what she sees and hears in the media."

He said besides all the media reports, Trudeau had been mocked in skits in the province's hugely popular year-end TV show satirizing current events.

Rancourt said Trudeau had asked him if there was any way he could stop all the media coverage.

"She was crying a lot."

Trudeau was arrested by Montreal police on Monday night when it became apparent that she would be released from a hospital where she had been taken.

The hospital trip and police intervention were requested by the Montreal police union and by her lawyer, after concerns were raised about her behaviour.

The 40-year-old mother of two became an Internet sensation during Quebec's student protests last year, when she was accused of aggressively pepper-spraying innocent bystanders.

Then she was accused of hurting a bystander in an incident that started with her demanding ID from a friend who was sipping beer by an apartment building doorway. As her noteriety grew, others came forward to complain about encounters with her.

Police conducted an internal inquiry into her conduct.

Police Chief Marc Parent said last fall as the file was turned over to Crown prosecutors that nearly 30 police officers and 50 citizens were interviewed.

Trudeau was moved to desk duty and then suspended from the force with pay after videos of an altercation last October between police and a group of people surfaced on the Internet and TV.

Police intervened after a man was spotted drinking beer outside an apartment. When a friend complained about an aggressive police reaction, he was put into a headlock, dragged down a flight of stairs and slapped into handcuffs.

A confiscated cellphone subsequently recorded conversations between the officers, apparently without their knowledge.

In a profanity-laced explanation of the arrest, the people in custody are referred to as "rats" who strum guitars and wear the red square symbol of the student protest movement.

It was during those student protests that Trudeau first got the public's attention when a video showed an officer liberally pepper-spraying demonstrators in May who appeared to pose no threat.

Social media lit up with outrage about the incidents and more than 200 people staged a protest calling for her firing after the second video surfaced.