A former Royal Navy chief petty officer faces a jail term after using the internet to try to have sex with a child.
It could be the first child sex prosecution based solely on emails
Jeremy Pepper, 31, sent a series of emails to someone he thought would help him find a girl aged between 11 and 14- years-old.
Prosecutors said it was the first time e-mails and chat room exchanges formed the entire case against a defendant.
Pepper, of Hove, East Sussex, pleaded guilty to the charges.
Middlesex Guildhall Crown Court in London heard Pepper logged on in June 2001 to what he thought was a US-based child porn website.
However, the site had been set up by the FBI in a bid to catch paedophiles.
Pepper, at first posing as a 26-year-old woman, began exchanging e-mails with an undercover officer, the court heard.
He told the officer he was interested in "child sex tourism" with a girl "11-14ish" and that he was getting "desperate" and "very frustrated" at the lack of progress in organising a tour.
An undercover Scotland Yard officer took over contacting him when the FBI decided Pepper would not travel to the US.
Pepper continued trying to procure an underage girl from the Scotland Yard officer, claiming it was the first time he had done so.
Prosecutor Miranda Moore QC told the court the Crown remained "neutral but sceptical" about that claim.
In February 2003, Pepper's patience ran out and he cut off contact with the undercover officer.
When he was arrested soon after, police found more than 400 images of underage girls on his computer.
Pepper initially told the court he had been entrapped and that the case against him should be thrown out.
But when the court ruled against him on Monday, he pleaded guilty to all charges.
He told the court he had been stupid, but that he would never have gone through with having sex with a child.
Judge Simon Smith adjourned the sentencing, but told Pepper all options remained "entirely open".
He said Pepper would also be placed on the sex offenders register, though it had not been decided for how long.
Pepper was bailed pending sentence and banned from using the internet.
He resigned from the Navy after his arrest.