A Cook County judge on Wednesday ordered a Park Ridge man with a history of mental health issues held without bail for allegedly stabbing his mother to death with a sword over the weekend.

David Krystyniak, 47, is charged with first-degree murder in the slaying of Judith Krystyniak, who was found Monday with her hand hanging out of a trash can inside the home they both lived in, according to Park Ridge police.

Investigators were still searching for a motive.

“It’s not clear what triggered this tragic and sad event,” Park Ridge Police Chief Frank J. Kaminski said during a news conference Wednesday.

About 9:30 a.m. Monday, an officer on routine patrol with a social worker in the northwest suburb noticed food and milk containers spread across the Krystyniaks’ driveway in the 1900 block of Courtland Avenue, Kaminski said.

The officer and social worker were familiar with the man because of his mental illness. They tried to make contact with him by knocking on the door and calling a phone, Kaminski said. No one answered.

The officer and social worker again checked the home around 12:15 p.m. and found David Krystyniak in the driveway, Kaminski said. Asked where his mother was, Krystyniak said she was sleeping inside the house. Krystyniak then invited the officer and social worker inside to see her. They checked the bedrooms but found no one.

The officer then noticed a large, two-wheeled garbage can in the living room and noticed a bloody hand hanging from it, Kaminski said.

Inside the can, they found the body of 74-year-old Judith Krystyniak, who had multiple stab wounds in her chest, Kaminski said.

Officers also found a 2-foot-long sword inside the house and immediately arrested Krystyniak. Krystyniak later admitted to detectives he stabbed his mother, Kaminski said.

Investigators believe the stabbing happened sometime on Sunday, and that Krystyniak planned to wheel out the trash to the street for pickup, Kaminski said.

Krystyniak lived in the home with his mother for decades, Kaminski said. Both were lifelong residents of Park Ridge. The police department had no knowledge of domestic problems in the past, although Krystyniak previously had displayed odd behavior.

“We’ve had calls of him doing erratic things,” Kaminski said. “For example, knocking on neighbors’ doors asking for money — asking for food.”

Kaminski said he was sometimes outside partially clothed, but there was no history of violent behavior.

Earlier this month, Park Ridge police received a call from David Krystyniak, who said his mom was having an overdose, Kaminski said.

Officers and paramedics responded, but the mother was fine. She told police that David was having problems balancing his new medication.

David Krystyniak’s criminal history includes a 2008 battery conviction, according to Cook County records. It’s unclear who the victim was.

His next court appearance is set for Aug. 14.

Read more on crime, and track the city’s homicides.