A 12-year-old girl married in an Islamic ceremony to a 27-year-old man in New South Wales miscarried after becoming pregnant, court documents have revealed.

A police statement of facts was tendered to the NSW District Court during the sentence hearing of the 27-year-old man.

The man has pleaded guilty to a charge of the persistent sexual abuse of a child after he told police he married the girl in an Islamic ceremony in the Hunter Valley last year.

The man, who can not be named, faces a maximum 25-year sentence for the offence.

The court papers revealed that after he was charged last year, an examination at Westmead Children's Hospital confirmed the child bride had "an ectopic pregnancy" and "miscarried".

She was examined after she complained of stomach pain.

The papers showed the man started texting the girl after he became aware of her at a mosque in late 2013.

The girl, who is now 13, is in the care of authorities.