A man previously convicted of a sexually motivated burglary was caught peering into a family's home in the middle of the night, the High Court heard.
Prosecutors claimed Alan Wortley was discovered standing on an oil tank at the property in Portadown as the father checked on his wife and children.
Wortley (52), of Annagh Hill, faces a charge of breaching a sexual offences prevention order (SOPO) following the incident last month. He was granted bail but banned from entering the town.
The court heard that a SOPO in place until 2017 bans Wortley from unsupervised contact with anyone under 16. Fiona O'Kane, prosecuting, said it was imposed after he was found guilty of a "sexually motivated" burglary in 2011.
Bail was granted after it emerged that Wortley could stay with a relative in another part of Co Armagh. Imposing a curfew and electronic monitoring, Lord Justice Weir warned him if he breaks his bail he will be remanded in custody.