TEXT messages sent by a man accused of killing two women and a baby by setting fire to their Cwmbran home show threats to kill, a court heard.

Carl Mills, 28, of no fixed abode, has denied killing his partner Kayleigh Buckley, 17, her mother Kim Buckley, 46, and Kayleigh's six-month-old baby Kimberley, by setting fire to their house at Tillsland, Coed Eva, in the early hours of September 18 last year.

On the first day of Mills' trial at Newport Crown Court, prosecutor Gregory Bull QC said the defendant, who had been in a relationship with 17-year-old Kayleigh, displayed abusive, controlling and irrational behaviour.

The court heard how Mills tried to drive a wedge between Kayleigh and her school friends, threatening them on Facebook and telling one of her male friends: "If you mess with me I am going to stab you."

"Mills was obsessively jealous of Kayleigh and was convinced wrongly that she was involved with other boys," said Mr Bull.

Kim was so fearful of threats made by Mills that she asked security guards at Primark in Cwmbran, where she worked as a cleaner, to tell her if he entered the store.

Colleagues said Kim was so unhappy in August last year that almost daily she would be found crying at work.

She told them Mills threatened to "burn her out of this earth".

Although the relationship lurched from crisis to crisis, Mr Bull said, Kayleigh fell pregnant and on March 10, 2012, gave birth to premature twin girls.

One baby, named Angel, was stillborn, while twin sister Kimberley was blind, deaf, had underdeveloped lungs, couldn't feed properly and had a heart defect.

Because of Mills' behaviour at the hospital, where the court heard he frequently turned up drunk, he was restricted to supervised access to baby Kimberley.

On August 28, Mills was allowed to stay overnight at the Tillsland home but when left alone, cut the wiring to the television, computer and fish tank, and failed to let the three family dogs out causing them to defecate in the living room.

When the family returned, Mills was gone with the keys, and Kim changed the locks.

A series of text messages, sent between 6.20pm on August 28 and 7.19am on August 29 from Mills to Kayleigh, show "the depth of hatred towards Kayleigh and Kim," said Mr Bull.

One message said, "It's funny that I can't see [Kimberley], I hope she dies"; another said, "I'm putting you in danger first thing, is your house going to go up in flames? You will be at home when it does".

Later he said, "I'll murder you all, might as well"; "I'm going to make sure you're a dead girl"; "I hope you die in that house"; and "I'll kill your daughter bye".

Later that month Mills and Kayleigh pitched a tent outside the house and Kayleigh would spend nights there with him, but his obsession that Kayleigh was having an affair remained, the court heard.

Although scheduled to come home on September 3, this was delayed until September 17 and Kim had decorated the house with bunting and balloons to celebrate the homecoming.

Tanks of oxygen were delivered to the house to allow baby Kimberley to breathe and Mills was warned that the tanks were flammable.

That night Kayleigh and Kim were bathing Kimberley and putting her to bed when more text messages arrived from Mills.

At 9pm he said "I'll burn your house down" followed by a message in capital letters stating "I hate you, I hope you get burned". At 9.44pm Mills said he was at a local landmark known as 'the brick' or 'the fort', and said: "Sleep with one eye open, I'm going for good but you're getting hurt first."

At 12.32am Mills said he was outside Kayleigh's front door and told her to look at the tent, which was burned, and said "your house will look like that". He said: "You can hide in a house but you won't get out".

The messages continued until 1.40am, approximately one hour and 35 minutes before the fire took hold of the house.

After fire fighters left the property due to the ferocity of the blaze, Mills appeared and showed no emotion, said Mr Bull.

"The actions of a cold calculating killer who knew exactly what he was doing, he had put in action a threat he had made less than two hours ago," he said.

A piece of bunting was found in an industrial bin nearby, not burned and with Mills' fingerprints on it, the court heard.

Mills was arrested at the scene and a blood test revealed 160 milligrammes of alcohol per 100ml of blood in his system - twice the legal limit to drive - but his frequent drinking meant Mills had a higher tolerance for alcohol, the court heard.

"The offence wasn't committed because he was drunk and didn't know what he was doing," said Mr Bull.

"It was committed out of spite, jealous and hatred."

I The trial continues tomorrow at 10am at Newport Crown Court. Mills denies the charges against him.