A man breached a restraining order three times within 24 hours of a court appearance for the same offence.
Blackburn magistrates heard Dominic Cooper accepted having contact with his ex-partner but said none of them had been intentional.
Cooper, 44, of Kipling Place, Great Harwood, pleaded guilty to breaching a restraining order. He was sentenced to 12 weeks in prison suspended for 12 months and ordered to pay £85 costs and £154 victim surcharge.
Malcolm Isherwood, prosecuting, said Cooper had appeared in court on Saturday for a breach of the restraining order and was fined £80 and ordered to pay £85 costs.
"He came out of court and breached the order again, twice on the same day and again the following morning," said Mr Isherwood. "This was a flagrant breach."
Mr Isherwood said on each occasion Cooper had gone to the home of his ex-partner's daughter who was also his niece.
"Even if he didn't know she was there he should have left as soon as he did," said Mr Isherwood.
Leigh Morgan, defending, said following his release from court on Saturday Cooper had gone to his niece's home.
"He went into the house having absolutely no idea his ex-partner was there," said Miss Morgan. "He spent a little time with his niece and then left."
She said he went back later in the night thinking his ex would have left. She was still there but he was not admitted and there was no contact.
He went back again at 11.21am the following day and she was still there and there was contact between them.
"On none of the three occasions did he know she was at the address but he accepts that once he realised she was he should have left immediately," said Miss Morgan.
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 here