STAMFORD — The teen accused of trying to stab a woman to death outside a Westport beauty salon and who police say plotted to kill people in their homes is expected to be released to a psychiatric facility.

Ellis Tibere’s family plans to post his $1 million bond and he will be taken to the Whiting Forensic Institute in Middletown, where he will be placed in voluntary “lockdown,” which includes around-the-clock supervision and psychiatric care.

Tibere and his attorney, John Gulash, appeared Monday in state Superior Court in Stamford where a judge denied a request to lower the bond to $500,000.

The 18-year-old Guilford High School student, who has been held since his January arrest, spent another night in jail Monday because his attorney said the bond paperwork could not be finalized before court closed.

Tibere, who is expected to post bond and be released to Whiting on Tuesday, has been found competent to stand trial on charges of attempted murder, first-degree assault and possession of a deadly weapon.

The prosecutor argued against Tibere’s release, saying he remained a threat to the community, based on comments he made to Westport police following his arrest.

Tibere told police he had been thinking of killing another person for nearly 10 years, Senior Assistant State’s Attorney Joseph Valdes said. Valdes said Tibere told police if he were released, he would try to do it again.

“Based on his conduct and his statements, we believe he is a risk to the community,” Valdes said.

Valdes said Tibere nearly killed a stranger he encountered in Westport with a 6-inch serrated knife by stabbing her multiple times in the leg.

“They thought it was a murder scene because there was so much blood,” Valdes said.

Attorney Eugene Riccio, who represents the 33-year-old Greenwich woman who suffered one wound that’s 4 inches deep, said his client is slowly recovering.

“My client’s leg looks like someone performed an autopsy on it,” Riccio said.

Stamford Superior Court Judge Gary White denied Gulash’s request to lower the bond and even considered raising it. However, Valdes said the $1 million was enough and raising it would only cause Tibere’s family more financial hardship.

White said if Tibere leaves Whiting for any reason, he would first have to appear in court.

Tibere is next scheduled to appear in state Superior Court in Stamford on March 2.

In search warrants that were unsealed last week, Westport police said Tibere admitted after his Jan. 6 arrest that he broke into two homes in town and planned to ambush the residents when they returned.

Gulash declined to comment last week about the search warrants, which did not indicate when Tibere allegedly broke into the homes and if police notified the residents. Police also declined to provide more information.

The search warrants also do not say what thwarted Tibere’s alleged plot to kill the homeowners.

Tibere told detectives he entered at least two Westport homes in an effort “to lie in wait for victims to kill,” according to search warrants. In the warrants, Detective Marc Heinmiller wrote that Tibere pointed out the homes in photographs shown to him by police.

According to the warrants, police were trying to “identify any other potential victims” by accessing Tibere’s school-issued laptop computer and his cellphone.

Tibere’s parents reported him missing the day before the stabbing. State police found him that night at the Interstate 95 rest stop in Darien, where police said he had been parked for more than two hours.

But because Tibere was 18, had not committed a crime and was not considered a threat, police said they were unable to detain him. According to a police report, Tibere said he planned to return to his Guilford home.

However, his father reported to police the next day that his son never came home.

Around the same time, police said Tibere was sitting for more than three hours in the parking lot of New Beauty Wellness on Post Road East in Westport before donning a black mask and attacking the Greenwich woman, according to an arrest affidavit.

Police said Tibere walked up to the woman’s car, opened her door and began stabbing her. Tibere told detectives he only stopped stabbing the woman when a man exited the beauty salon, according to the affidavit.

When police arrived, they found two men trying to stanch the victim’s bleeding. Officers applied a tourniquet to the woman’s leg and she was taken to Norwalk Hospital.

Police found Tibere driving south on the Sherwood Island Connector shortly after the incident, where he surrendered without incident.