A 50-year-old man has been warned he faces an indefinite jail sentence for kidnapping a boy and girl, both aged 10, in separate attacks.
Michael Jackson pleaded guilty in May to charges including sexual assault, false imprisonment and kidnap relating to the boy's disappearance in November.
Reporting restrictions were lifted at Birmingham Crown Court on Monday.
Jackson, of Bristnall Hall Road, Oldbury, West Midlands, is due to be sentenced on 29 October.
Originally called Albert England, Jackson could face an indeterminate imprisonment for public protection (IPP), his counsel said.
A desperate search was launched by police and local residents in Oldbury after the 10-year-old boy went missing as he walked to shops on 13 November.
He was later found in Jackson's flat, the court heard.
Prosecutor Debi Gould said the boy had been "trussed up" in a cupboard before being sexually assaulted.
He managed to move towards a window in the flat, where he was spotted by a woman involved in the search.
Jackson, who has previous convictions for sexual assault, also admitted abducting a 10-year-old girl in a separate incident in the West Midlands on 14 September 2011.