A married man who invited a teenage boy to his home for sex opened the door to the police after being duped by paedophile hunters.
Leslie Parkin, 39, thought a 14-year-old he met over social media would be turning up at his house as a result of illicit online conversations where he sent sexual photographs and offered alcohol.
But Newastle Crown Court heard an organisation called Guardians of the North had been posing as the schoolboy and alerted the police to Parkin's illegal invitation.
Prosecutor Emma Dowling told the court the group had set up a fake internet profile of a 14-year-old lad called Jake and made contact with Parkin in October.
After about a week of chatting, the conversation became sexual and Parkin asked for naked pictures then sent a photograph of himself, followed by explicit images.
The court heard Parkin asked "would you like" and suggested "I'm free in the morning" after sending the sexual photographs.
Miss Dowling added: "He then gave Jake his home address and arrangements were made for Jake to come to his house on the Saturday morning and sexual activity would take place and the defendant would give Jake a bottle of lager if he came around.
"The police went to his house instead of Jake."
Parkin, of Renfrew Road, Sunderland, admitted attempting to meet a child after sexual grooming.
He told police he got "carried away" during the online conversations.
Mrs Justice Whipple told him: "You invited Jake to your address, offering him a bottle of lager and you accept that was with the intention you should have penetrative sex with Jake.
"Of course Jake did not come, in fact the police came and arrested you, having been tipped off by the authors of the false persona."
The judge sentenced Parkin to two years imprisonment, suspended for two years, with rehabilitation requirements and sex offender group work.
Parkin must sign the sex offenders register and abide by a sexual harm prevention order for ten years.
The judge said the inevitable jail term could be suspended to allow Parkin a chance to address his offending and prevent future risk.
Lee Fish, defending, said Parkin, who has never been in trouble before, has a supportive wife and family and is highly thought of by those who know him.
Mr Fish said Parkin is determined to address the problems that led to his offending.
He added: "Whatever was discussed online, it did not, in fact, occur, nor could it have done."