A pensioner was confronted with two burglars when she went to investigate a noise in her bungalow.
The 74-year-old was in bed at her home in Littlemoor Road, Mirfield, just after midnight on January 18 when she heard something in her living room.
She got up and saw a male, later identified as Christopher Paul Evans, half way across that room, while a second figure was climbing through the window.
She bravely told the pair the police were on the way although she had not yet called them, Simon Haring prosecuting told Leeds Crown Court.
After Evans swore at her the pair fled, but were arrested nearby in Huddersfield Road because they matched the description she gave to officers.
Christopher Evans, 18, of Chidswell Gardens, Chidswell, Dewsbury, was sent to a young offender institution for 30 months after admitting the burglary and breaching a previously suspended sentence.
Drew Gandalf Evans, 19 of Calder Road, Dewsbury, no relation to his co-accused, got 16 months detention suspended for 18 months and 30 days activity for the burglary.