A violent attacker approached witnesses outside Kirkcaldy Sheriff Court, trying to persuade them not to give evidence.
Former soldier Alan Adsley offered money to the man he had stabbed.
The victim, Adsley’s cousin, was approached twice by him when he was at court for the trial.
Adsley, of Blackcraigs, Kirkcaldy, had stabbed his cousin after turning up at his door late at night.
His bribery plan backfired and resulted in Adsley receiving more jail time than he initially faced.
Adsley, 37, appeared from custody for sentencing at Dunfermline Sheriff Court, having previously admitted a string of offences.
On May 29 in Kirkcaldy, he assaulted William Allan by lunging towards him and striking him with a key, to his injury.
He also breached a home curfew imposed in his bail conditions.
On various occasions on January 29 and 30, he attempted to pervert the course of justice in a bid to have charges against him thrown out.
He telephoned a female witness and told her to incriminate another person when giving evidence. Then he told her to claim she was ill and unable to attend the court.
On May 30, he approached William Allan and offered to pay him not to attend court.
Adsley also breached bail conditions not to approach or contact William Allan.
Depute fiscal Jade Doig said the stabbing incident occurred at around 3.45am when Adsley turned up shouting at the victim’s door.
Adsley later told an acquaintance, “I’ve just stabbed Billy a few times.”
When Mr Allan turned up at Kirkcaldy Sheriff Court for the trial, he was approached by Adsley.
“He said he would give him money to pay off his debts,” added Ms Doig.
At lunch-time, Mr Allan was again approached by Adsley, who told him if the witnesses did not give evidence “it will get thrown out”.
The court was told Adsley had served in the Army for 14 years but developed a drugs problem and mental health issues.
Sheriff Charles MacNair jailed Adsley for 24 and a half months.