A man poured petrol over his ex-girlfriends door and threatened to burn down a block of flats in which they both lived.
Paul McCrystal admitted to pouring petrol over the door and threatening to burn the flats down once arrested by police on August 9, 2020, the day it happened.
McCrystal, 41, was said to have become furious by an incident which occurred the night before when his flat was broken into and ambushed.
He believed that those responsible were the teenage sons of his ex-partner Claire Bishop.
McCrystal was sentenced at Cardiff Crown Court on Monday after spending the time since in custody.
Addressing the court, Judge Wynn Morgan described how both the victim, Claire Bishop, and defendant, lived separately in the same block of flats on Bridge Street in Abercarn. The victim on the upper floor and McCrystal on the ground floor.
"The pair had been in a relationship on and off for about three to four years. The night before the offence the defendant's flat had been broken into and ambushed. He thought the main suspect of the incident was the teenage sons of Claire Bishop," said Judge Morgan.
"The defendant felt angered as a result. He took a can of petrol up to the upper story flat and he was shouting.
"Miss Bishop was in her flat, she remembers the defendant shouting: 'I will do time for your family, I will burn down the block of flats'.
"She moved away from the doorstep of her flat, she closed her front door and held it closed with her body when she realised the defendant was pouring petrol all over the front of her door."
Find out about local crime in your area:
Miss Bishop called the police and McCrystal was taken to the police station and made an admission at the earliest possible opportunity.
He said that he was in possession of the petrol due to having borrowed a petrol grass trimmer from a friend.
Mitigating on behalf of McCrystal, defence James Evans urged Judge Evans to consider the fact that McCrystal had been in custody since the incident and therefore had already served the punitive element of his sentence.
He added that McCrystal had made directions to him of his intentions to rehabilitate, and said: "He would welcome all the help and intervention."
McCrystal, who has 15 convictions for 33 offences, the last having occurred in 2015, was sentenced to an 18 months community order, having already spent the last few months since the incident in custody.
A restraining order preventing McCrystal from making contact with or being near the property of Miss Bishop was also granted against him
In addition to this, McCrystal will have to a 15 days thinking skills programme to ensure his rehabilitation.