He added: "The child was violently vomiting at this stage. She told people at the house to ring for an ambulance."

A police officer performed mouth-to-mouth resuscitation before the girl was taken to hospital.

The accused, formerly of Clonavon Avenue, Portadown, Co Armagh, was arrested and said: "I did not do anything."

Judge Geoffrey Miller was told Fagan had an "extensive criminal record" including convictions for violence.

One was for attacking the 20-month-old child of a previous partner.

The court heard Fagan told the Probation Service, which assessed him as “dangerous”, he “punched the child as she would not stop crying”

A defence lawyer said the defendant had an “absolutely wretched childhood” and was sorry for the attack on the child.

The lawyer urged the judge to afford Fagan up to 25% reduction in any term given his plea, remorse and personal circumstances at the time, adding the sentencing range was between four-and- a-half years and 13 years.

Remanding Fagan back into custody, Judge Geoffrey Miller said he would pass sentence on June 9.