A police officer has been taken to hospital after being slashed in the neck and arm in Sydney's south west this morning.

Police say the incident occurred at a house in Sadleir, near Liverpool, about 7am after officers attended the home in relation to a warrant concerning a 58-year-old man.

Constable Jacob Vella, who was stabbed in south-west Sydney. ( Facebook/NSW Police )

A 27-year-old man allegedly confronted the officers before stabbing a 24-year-old male constable in the hand and slashing him in the neck.

The officer, Constable Jacob Vella, has been taken to Liverpool Hospital in a serious but stable condition.

Istana Sleiman, who lives in the area, said she woke up and heard screaming.

"I saw a man on the floor, he was struggling to get up he was, [there was] blood all over the floor, really on his hands," she said.

"He got a towel — I don't know what it was, a top — wrapped it around his neck screaming for help."

The police officer had attended the home to carry out a search warrant in relation to alleged stolen property.

A father and son were arrested at the scene and taken to Liverpool Police Station.

Another older man at the home is also speaking with investigators.

The weapon alleged to have been used in the attack on the police officer.

There was a large police presence at the house near the corner of Heckenberg Avenue and St Johns Road, where police were searching the backyard.

Part of the footpath and road has been closed and several towels and a pair of rubber gloves were strewn across a driveway.

Local resident Sylvia Ibrahim said it was "shocking and sad" a police officer had been stabbed in her neighbourhood, which she described as peaceful.

"A lot of noise, a lot of sirens, and police cars, and ambulance, and screaming, and people struggling — it was quite chaotic," she said.

"I've seen someone on the floor and the police were just over him, around four, five, six police officers over him, trying to get hold of him."

NSW Police Association president Tony King said the attack had sent shockwaves through the police community.

"What some people seem to forget is that our police are women and men, just like the rest of us," he said.

"They're mums, dads, sisters and brothers, daughters and sons who do a difficult, unpredictable, and at times dangerous, job."