A mother-of-two allegedly killed by her ex-partner had been terrorised by him for months, a court has heard.
Karen Brookes, 37, was stabbed in her car after arriving for work in Barwell, Leicestershire, and died in hospital on 12 November 2009.
Kevin Sainsbury, 51, of Charnwood Road, Barwell, has denied murder.
Nottingham Crown Court was told he was on bail after being charged with threatening to kill Ms Brookes and harassment.
John Pini, prosecuting, told the jury: "One of the conditions of that bail was that he was to have no contact with Karen Brookes, but he was determined to get to her, and did so."
He said the defendant had followed Ms Brookes on the morning of the attack to her workplace in Moat Way.
Mr Pini said: "The defendant pulled up in front of her, bumper to bumper.
"He got out and was armed with a weapon.
"He went up to the window and smashed it, then yanked open the door and stabbed Karen Brookes three times in the chest."
He added that Mr Sainsbury accepted he was responsible for the attack but did not intend to kill Ms Brookes or cause her serious harm.
The court heard their relationship, which lasted for about 15 years, ended in April last year, but the defendant found it difficult to accept this.
The prosecution cited excerpts from Ms Brookes' diary, showing her concern over his increasingly unpredictable behaviour.
In one of the last entries before her death the victim said Mr Sainsbury was: "A violent man with the potential to kill himself and me."
Mr Pini also told the jury how the defendant sent Ms Brookes various threatening and expletive-ridden text messages.
The trial continues.