The man accused of leaving a two-year-old girl fighting for life in Sydney has been identified.

A two-year-old girl has been left fighting for her life after suffering a “vicious assault” in Sydney’s west, allegedly at the hands of a man in his 20s on Monday afternoon.

Police have said the man who allegedly assaulted the toddler, Mohammed Khazma, had only known the mother, aged 22, for a short time – about four to six weeks.

Police allege Mr Khazma physically assaulted the girl on Monday afternoon in a granny flat in Marian Avenue, Guildford, that the trio lived in.

Mr Khazma did not appear at Parramatta Local Court on Tuesday but was legally represented, the Sydney Morning Herald reports.

He did not apply for bail on the charge of reckless grievous bodily harm and is scheduled to face court again in January.

The relationship between Mr Khazma and the child could not be detailed for legal reasons.

It is understood the mother witnessed Mr Khazma allegedly physically assault the child and was able to intervene and leave the granny flat with the toddler in her car.

She then drove to a Western Sydney home shortly after the attack with her daughter in the back seat, neighbours have told Channel Seven News.

“Your son has killed my daughter,” she reportedly yelled at the house’s occupants.

When the woman collapsed in the front yard with her daughter unconscious in the car, family members from the household called emergency services to the Guildford West home on McCredie Rd.

Mohammed Khazma. Source: Facebook.

The toddler had suffered a cardiac arrest while inside the car, reports.

Local police were among the first on the scene and performed CPR on the girl until she was rushed to The Children’s Hospital at Westmead, where she remains in a critical condition.

Mr Khazma was arrested at 5pm on Monday evening in relation to the attack, and later charged with reckless assault causing grievous bodily harm.

NSW Police's acting commander Glen Parkes said on Tuesday morning the community and responding officers were still trying to come to terms with the attack.

"It is shocking for the community and the police attending," he told journalists outside Granville Police Station today.

"It is human instinct to care for the young ... the mother is very upset as you can imagine."

A neighbour said she saw the mother appear at the front of the house.

"She (the mother) said, 'Your son hit me, your son has killed my daughter'," the neighbour said.

"I’ve never seen anything like it. I thought it was a big fire and that fire engines were going to show up but suddenly the street was full of cops."

Crime scenes were established at both addresses after forensic units were called to examine the properties.

* Feature image via Facebook.

00:00 / ???