“You shouted you didn’t give a f***, which I’m sure were your feelings at the time.

“You then used the knife to self harm. That is no mitigation. It demonstrates in that highly unstable state you were a danger to yourself as well as others.”

Ward, from Morecambe, was charged with attempted murder but later pleaded guilty to wounding with intent.

The court heard he had a troubled background and has developed a personality disorder which is exacerbated by the use of drugs.

At the time of the attack at their home in Lancaster in August last year, Ward was on bail for racially aggravated ABH and harassment after he bit the arm of a security guard who detained his girlfriend when she was suspected of shoplifting.

During the attack he launched a tirade of racial abuse at the security guard and later made racist and offensive comments to a police officer in the custody suite.

Justice Cheema-Grubb said: “Who are you Paul Ward?

“You are 42 years old. You had a dreadful start in life but you know as well as everyone else in this room knows that there comes a time when you have to put your origins and the way in which you were mistreated behind you and look to your future.

“Your partner forgives you. She has been very gracious and wants to stay in a relationship with you.

“You were the one who used a weapon, terrifying this innocent woman.

“This was against a background of some violence from you in the past.”

The judge said Ward was a dangerous offender and sentenced him to 10 years and eight months with a custodial element of six years eight months and a further four years on licence.