An appeal has been lodged by the Director of Public Prosecutions against the sentence given to a 24-year-old man who raped a four-year-old girl as she slept at her grandmother's house.

The Attorney-General, John Hatzistergos, today said he had been informed by the DPP that an appeal had been lodged against the two-year suspended jail term given to the man in the Downing Centre District Court on February 5.

Mr Hatzistergos said he had raised his concerns about the case with the DPP yesterday.

"I referred the matter to the director yesterday because there were understandable concerns about this particular sentence and I believed it required further analysis,'' Mr Hatzistergos said.

"I can well understand that that there are understandable community concerns in relation to any incidents in relation to sexual assailed of person, particularly of that age. It's an abhorrent crime.''

Mr Hatzistergos said the maximum sentence for sexual assaulting a child under 10 years was 25 years while the standard minimum sentence was 15 years.

The Opposition had demanded that the DPP appeal against the sentence.

Police were called to the house on November 22 after the girl's grandmother discovered her car had been broken into. When they arrived, the girl told them that a man had been inside the house overnight and had sexually assaulted her. The man was arrested five days after the attack when police matched him to DNA on clothing found at the scene.

He was charged with sexual assault of a person under the age of 10 as well as several other charges including break and enter. The man spent 14 months in prison awaiting his sentence but walked free after his appearance last month.

The shadow attorney-general, Greg Smith, described the sentence as "unbelievable".

"It seems totally inappropriate for the court to impose such a light sentence where the maximum penalty for such an offence is 25 years. An explanation is required," he said.

Mr Smith said the leniency of the sentence sent a poor message to the community.

"The community have a right to expect the punishment to fit the crime. Here the crime was against a four-year-old child," he said.

The girl's MP, Steve Cansdell, said he was "angry and disgusted" the man had been released. "I have had a crisis meeting with shadow attorney-general Greg Smith and he has agreed the NSW Opposition will do everything possible to convince the Director of Public Prosecutions to appeal this ridiculously lenient sentence.

"Crimes against children, particularly those of a sexual nature, deserve the harshest possible punishment, but instead this animal is out on the streets, walking and possibly stalking his next victim."

A spokesman for the DPP refused to comment, saying his office was awaiting a transcript of the judgment.

- with AAP