VIGILANT neighbours alerted police to foil a burglary in Wollaton, a court heard.
Two offenders were caught when police arrived at the scene. Adam Blake and Shannon Dar had left a betting shop to find somewhere to burgle in Wollaton Road.
Neighbours spotted them knocking on the front door of a couple who were at work on October 2 last year.
Both men disappeared around the back of the house and a door was kicked in, triggering the house alarm, Nottingham Crown Court heard.
Blake, 24, of Chippenham Road, Bestwood Park, and Dar, 24, of Tonnelier Road, Dunkirk, were arrested.
Blake had previous convictions for house burglary in 2003 and 2005, attempted burglary in 2005 and assaulting a police officer in 2005.
He was jailed for 12 months after admitting attempted burglary.
Judge Andrew Hamilton said the offence should have been charged as burglary because a door was kicked in.
"If it hadn't been for the alarm going off, they would have gone in and stolen what they could get their hands on," he said.
He told Blake:"You were caught because police came quickly and because neighbours opposite kept a close eye on what was going on."
Dar, who had convictions for robbery and criminal damage, was convicted of the offence.
The court heard he now had a stable address after being homeless since the age of 15.
Judge Hamilton gave him 12 months in prison, suspended for two years. He is tagged and under curfew at night.
The judge, who wants to check his progress on July 15, warned: "I'm going to keep an eye on you."