Man charged after allegedly undressing girl in abandoned Macquarie Fields house

A man will remain behind bars after he allegedly took a young girl into an abandoned house in Macquarie Fields and started to undress her.

The seven-year-old was playing in front of a house in Bunya Place about 4pm on Friday when she was allegedly approached by 34-year-old Christopher Irwin.

Police allege Irwin grabbed the girl by the hand and took her into a vacant property nearby, where he partially removed her clothes.

A witness saw Irwin approach the girl, police say, and contacted her grandmother who then went to the house and found the girl.

"We ended up yelling out, ringing the police. It was the quietness when we were banging on the door that was my biggest fear," her grandmother told media.

"Then I hear her voice, like a muffled sound, then I hear 'nanny'... She was just like, 'nanny, he told me he was going to show me something cool, then he took me inside and closed the door but there was nothing cool. He lied to me'."

The grandmother described the alleged incident as "something that no parent should have to go through".

Irwin was detained until officers arrived at the scene and arrested him, police said.

He was refused bail at Parramatta Bail Court on Saturday.

The court heard he told the girl to "be quiet and I'll wait for your nan to go and then I'll let you go".

It also heard he has a prior conviction for accessing child pornography and a mild intellectual disability.

The magistrate described the allegations as "disturbing" and "concerning", according to Nine News.

Irwin was charged with taking a child with intent to remove parental control, remaining in a building with intent to commit an indictable offence, and two charges of failing to comply with reporting obligations under the Child Protection (Offenders Registration) Act.

The first charge has a maximum penalty of 10 years' imprisonment.

According to court documents, Irwin lives in Macquarie Fields less than 300 metres away from the street where the incident unfolded.

He will face court again at Campbelltown on June 5.