A former scrap metal dealer has gone on trial accused of setting off on "a murderous spree" in which he killed four members of the same family.
Mandy Power and her daughters were killed at the family home
David Morris, 44, of Craig-cefn-parc, Swansea Valley, denies killing three generations of the same family in 1999, in a re-trial at Newport Crown Court.
Mandy Power, 34, Katie, 10, Emily, eight, and Doris Dawson, 80, died at their home in Clydach, near Swansea.
Mr Morris' previous murder conviction was quashed on appeal.
At the opening of the re-trial on Thursday, Patrick Harrington QC, prosecuting, said the family had been victims of the most appalling and grotesque violence - bludgeoned to death by a long pole.
David Morris denies all four murders charges over the killings
He said: "In the early hours of Sunday June 27, 1999, an horrific multiple murder was committed at a house in Clydach in the Swansea Valley.
"Three generations of one family were brutally put to death, we say by the defendant, who exploded into an uncontrollable rage."
He added: "This was not merely a murder, this was a massacre."
Mr Harrington said Mandy Power had been attacked in three bedrooms of her home in Kelvin Road, Clydach, suffering 38 injuries. Her body had been stripped naked and sexually assaulted.
He said Doris Dawson's face had been "crushed with blows of monumental force" .
He said both children, Katie and Emily, had suffered devastating head injuries.
"She suffered a number of blows after she died. Emily, let me remind you, was eight," he added.
Mr Harrington said the Crown's case was that Mr Morris was "a violent thug" with a history of "violence towards women".
The house had at least four seats of fire the court heard
He said the "unique and complex background" of the case had led to a number of false trails, with potential evidence being obscured and the "false finger of suspicion" being pointed at three other people.
These included Alison Lewis, with whom Mandy Powers was in a "settled and loving lesbian relationship".
The jury was told the other suspects had been Ms Lewis' husband Stephen, a police officer, and his twin brother Stuart Lewis, also in the police.
But, he said, a gold chain found at the house "may be the clinching piece of evidence in this case".
The court heard the chain had been found covered in Ms Powers' blood.
Mr Harrington said Mr Morris had eventually been compelled to admit the chain was his.
He said: "He was seen wearing it by a number of impressive witnesses in a public house a 14-minute walk away from Kelvin Road in the hours leading up to these killings.
"In a public house when he was heard to revile Mandy Power in the clearest terms, and where he showed an obvious antipathy towards her.
"In a public house where, fuelled by drink and drugs, he set off for a murderous spree which killed four people and destroyed the lives of many others."
He said Mr Morris had then tried to cover his tracks by setting fire to the house, with at least four seats of fire.
The trial continues.