THE first thing Ralph Sarchie saw was the mattresses – in the living room.

The next was the evil spirit.

Make that evil spirits.

They seemed to be everywhere in that house on Staten Island – and they seemed to be targeting the family’s 17-year-old daughter.

Unseen things would pull her hair, bite her, hit her, or fling objects – like a hairbrush – at her.

It was all in a day’s work for Sarchie, a 37-year-old housing cop who moonlights as a demon detective.

“People need help and I am there to help them,” said Sarchie, a 15-year NYPD veteran assigned to Brooklyn.

“We are in a war that is not to this earth.”

Sarchie is a devout Catholic – but does not do his otherworldly detective work for the church, which acknowledges “possession” but frowns on lay people practicing as exorcists.

“It’s like the Police Department,” he said. “They don’t want to let civilians sit with cops on patrol duty.”

He’s strictly freelance – people find him through word of mouth.

Sarchie’s interest in fighting demons began at age 12 when he started reading books on the subject.

At 27 he became associated with a group of “demonic investigators” working for the Rev. Robert McKenna, 70, of Connecticut.

McKenna, an ordained priest, split from the Catholic Church to perform exorcisms. The church does not recognize him as qualified to exorcise spirits.

Sarchie became the group’s chief investigator in the city.

He’s married and has two kids, ages 9 and 4. He’s never been possessed – but has had his run-in with spirits who visited his Queens home.

“I remember jumping off the couch – I don’t think I touched the floor – when I saw a tall black shadow moving away from my daughter’s crib,” Sarchie said of a sighting about eight years ago.

When Sarchie is called out on a job he comes armed with his special crucifix – which he says contains a sliver of the cross that Jesus Christ died on.

“That is my equivalent of a cop carrying a gun.”

The Staten Island case occurred in the early 1990s.

Family members “wouldn’t go anywhere the in house alone, not even to the bathroom,” he said. “They all lived together in the living room.”

He took his search for demons to the basement, which he entered alone.

“When I got to the storage door, I stopped frozen out of fear in my heart,” Sarchie said.

Sarchie backed out of the basement and told other members of his demonic investigation team that something was in the house.

He determined that spirits roaming the two-family home had targeted the homeowner’s teenage daughter. The spirits’ motive, he said, was to “weaken the faith” of the girl’s mother – and eventually “possess” the older woman.

Sarchie and his team spread holy water, incense and holy oil throughout the house.

In unison, the team began praying.

Soon the neighborhood dogs began barking – a sign that the evil spirits were fleeing.

But one remained behind. They called in a priest, he said, who spent a year purging the home of its demon.

Sarchie does not personally do exorcisms, but has helped out in about 20 of them.

He says he’s conducted investigations and helped remove spirits from about 50 homes throughout the area – free of charge.

Sarchie prepares for his role by going to confession and fasting for days.

The physical confrontations are exhausting. Sarchie refuses to talk about his mental battles with demons and the “horrifying visions” that pop into his head during exorcisms.

“The demons touch your innermost psyche and they know what causes you the most pain,” said Sarchie, who in his day job has faced down criminals carrying knives and guns.

Sarchie says his work with demons “is a type of calling. Without sounding like a religious fanatic, I believe I was called to do this work. Your motives have to be pure.

“Being a cop is thankless job.

“But in this work I see a family getting the help they need – that’s my payment.”