According the warrant released on Monday, James Carroll used instant messaging to tell an internet friend in England about his plans to have sex with a 5-year-old girl.
The 17-year-old girl told authorities across the pond that she had had an internet sex relationship with Carroll since she was 14.
But she said the messages about his plans to have sex with the 5-year-old girl made her call police.
English authorities contacted federal authorities in the states, who got in touch with Cary police.
"We do feel very good about having been able to intervene as quickly as we did considering it did come from across the sea," Cary Police Department Major Dave Wulff said.
He said it may have prevented a crime against a child.
"Very potentially could have prevented a crime against a child," Wulff said.
Carroll is just a couple of weeks away from turning 20 and a NC State sophomore who lives with his parents in a house in Cary's Wessex Subdivision.
Residents in the subdivision say they are shocked by the child porn police say they found on Carroll's computer.
"Very explicit and very disconcerting," neighbor Jim Scalise said.
But Scalise was even more shocked by what he read in the search warrant that Carroll allegedly planned to have sex with the young daughter of family friends he was going to babysit on Saturday.
"To know that somebody would be in our own neighborhood who might take advantage of any child, let alone somebody nearby, it was just shocking to read that," Scalise said.
At Carroll's home on Monday, a woman - who was apparently his mother - answered the door.
"I can't comment, I'm sorry, I can't," Brenda Carroll said.
A few hours later, James Carroll was released on bail and put on house arrest. He will as be monitored electronically.
While his return to the neighborhood is unsettling for some, they say they are grateful that police have an eye on things.
"Very impressive on how seriously they took it and how fast they moved," Scalise said.