RALEIGH, N.C. -- A North Carolina teenager accused of decapitating his mother is psychotic and won't be prosecuted on a murder charge, his attorney said Wednesday.

A judge ordered 19-year-old Oliver Funes Machada involuntarily committed to a state psychiatric hospital after a series of mental health evaluations, including those by state experts, defense attorney Boyd Sturges said. Machada was ruled incompetent to proceed with his case.

"This is consistent with what our position is," Sturges said. "We feel that Mr. Machada is very, very seriously deranged. And clearly he's psychotic, and we think the state's correct."

Oliver Funes Machada in a North Carolina court, Tuesday, March 7, 2017. WNCN

Sturges said the prosecutor agreed to dismiss the murder charge under an arrangement that could allow the case to be pursued again if Machada were deemed competent in the future.

Get Breaking News Delivered to Your Inbox

Machada told a 911 dispatcher he stabbed his mother repeatedly on a March 2017 afternoon because she had angered him, according to court documents. The teen calmly told the dispatcher that he wouldn't harm two younger siblings heard wailing in the background of a 911 recording.

Machada told dispatchers he killed the woman "because I felt like it," according to an investigator's affidavit obtained by CBS affiliate WNCN.

He also told a dispatcher that "he stabbed her 'like eight times' and left the knife in her mouth," according to the sworn statement by Det. A.R. Roberts of the Franklin County Sheriff's Office, reports the station.

Warrants say a deputy saw him carry his 35-year-old mother's severed head and a knife outside their home in Zebulon, which is east of Raleigh. The siblings, ages 2 and 4, were unhurt when authorities arrived at the grisly scene on a quiet, rural street.

Court documents said Machada, who was 18 at the time, was on multiple psychiatric medications.

Immigration officials have said Machada was in the country illegally from Honduras and issued a detainer so that it could consider his removal if he were released by local authorities. U.S. Immigration and Customs Enforcement spokesman Bryan Cox said Wednesday that the agency won't intervene as long as the suspect is in state custody.