A 22-year-old woman was locked in a first floor flat for two days with little food and no toilet facilities.
Lorraine Dunbar's ordeal only ended when her banging attracted the attention of a caretaker who was able to free her from her flat in Whetley Grove, Bradford, a Court was told.
Her boyfriend Zulfiqar Shaffi was yesterday jailed after pleaded guilty to false imprisonment at the city's Crown Court.
Shaffi, of Southfield Square, Manningham, claimed that Miss Dunbar was a drug addict and he had locked her in the flat to stop her getting on to the streets while he went for a hospital appointment.
But when he realised he would not be returning to the property he made no efforts to contact anyone so that she could be let out.
Prosecutor John Topham said Miss Dunbar had to use the sink when she wanted to go to the toilet during her ordeal.
After the caretaker released her, the locks on the flat were changed, but when Shaffi finally returned the following day he broke down the door.
Having tracked down Miss Dunbar he assaulted her in his car and later at the flat before she escaped and locked herself in a downstairs toilet.
Mr Topham said witnesses then saw Shaffi kick in the toilet door and carried out another attack on her.
"The defendant grabbed hold of her hair and began banging her head against a wall in the toilet,'' said Mr Topham.
One witness described seeing a bald patch where some of her hair had been pulled out and she was later treated in hospital for injuries including a cut to her lip and multiple bruises.
Shaffi, who was later arrested in Scunthorpe, also admitted a charge of assault occasioning actual bodily harm and was jailed for a total of four-and-a-half years.
For an unrelated offence of common assault he received a concurrent jail term of three months.
Passing sentence on Shaffi, Recorder Deborah Sherwin noted he had expressed concern for Mis Dunbar as being part of his motivation for locking her in the flat.
"You have a strange way of showing your concern,'' she added.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article