A man threatened to burn down a block of flats after paying £20 for oral sex he did not receive, a court heard.
Dean Ley, 53, was holding a cigarette lighter while shouting at residents who were hiding a woman he claimed had ran off with the money he gave her for sexual services.
After being arrested and released on bail, Ley then burgled and ransacked the headquarters of a charity that provides support to disabled children, Wales Online reports.
Swansea Crown Court heard that on September 3 this year, people living in flats in the city's St Helen's Road were disturbed by someone in the street below "shouting aggressively".
Craig Jones, prosecuting, said when residents went to their windows, they saw Ley striking a cigarette lighter and threatening to burn the block down unless they stopped "hiding" a woman.
The court heard the threats of arson went on for some time with the defendant trying to gain entry to the block through the communal front door.
Mr Jones said at one stage Ley was joined by a female friend who told the frightened residents: "You don't know him. He will gut you all."
Police were called and the defendant told officers that he had paid a woman £20 for oral sex but that she had run away with the cash.
He said had seen her going into the flats and he wanted to get his money back.
Ley was arrested, charged and on September 10 appeared at Swansea Magistrates' Court where he was granted bail.
The court heard just four days later Ley broke into the Gordon Moore Friends of the Young Disabled, a charity based in the former Cwmfelin works office building near the Cwmbwrla roundabout in Carmarthen Road.
The voluntary organisation provides a range of support and therapies for youngsters from across Swansea.
Mr Jones said the defendant ransacked rooms on all three floors of the building during the evening break-in, stealing money and a TV set.
The prosecutor said the intruder was quickly identified by police and tracked down to a friend's house and when officers caught him he was in the process of counting the money he had just stolen.
The court heard that in their police statements the tenants of the St Helen's Road flats said they were afraid Ley was going to carry out his threats, while in a victim impact statement the secretary of the children's charity said the raid had caused weeks of disruption.
Ley, of Vincent Street, Sandfields, Swansea, admitted charges of making threats to damage property by fire and burglary.
The court heard he has "numerous previous convictions" for a range of offending including 15 non-dwelling burglaries, house burglary, possession of bladed articles, robbery, common assault, and criminal damage.
He robbed a man with learning difficulties who was visiting Swansea for the day.
Judge Huw Rees said Ley had been "motivated by revenge" when he made the threats to burn the flats down and that it must have been a frightening experience for the residents.
Giving the defendant credit for his guilty pleas, the judge Rees sentenced Ley to 18 months for making threats and six months for burglary with the sentences to run consecutively making a total sentence of two years.
The defendant will serve up to half of that period in custody before being released on licence.