A man who smashed a window with a hammer and then punched a friend who was at his girlfriend's house has been allowed out of custody.

David Gow, 24, was jailed for four months yesterday after he admitted offences of criminal damage and assault, but because he had already served about two-and-a-half months behind bars, Judge James Stewart QC said the sentence saw his immediate release.

Prosecutor John Topham told Bradford Crown Court Gow had been in a relationship with Adele Hird, but after they had broken up he made various phone calls to her.

In January last year Gow had been at the Milk Bar nightclub in Bradford when he saw Miss Hird and his friend, Nolan Huxham, together. Miss Hird and Mr Huxham returned to her home in Wibsey in the early hours but Gow arrived at the house with a lump hammer.

"He was trying to kick the door through and while Adele Hird rang 999, Huxham went upstairs out of the way," said Mr Topham. "Gow then attacked the kitchen window with the hammer. He smashed it and then climbed through."

He then went upstairs and punched Mr Huxham.

Judge Stewart noted that the unemployed sandblaster had been drunk at the time of the offence and the people involved had forgiven him.