Two police officers were subjected to a "terrifying" firebomb attack on their homes, a court has heard.
Angelo DeBono, 31, Jamie Brett, 20 and Jason Eagles, 22, all from Clacton, Essex, are accused of carrying out the attacks on January 28.
Det Insp Michael Ornellas and Sgt Martin Brough and their families managed to escape from their houses.
The defendants, on trial at Ipswich Crown Court, deny attempted murder and arson with intent to endanger life.
Prosecutor Peter Lodder QC said Det Insp Ornellas and Sgt Brough and their families were asleep in their homes in Clacton when they heard the sound of windows being smashed.
Both discovered a fire around the front door, he said.
Det Insp Ornellas, his wife and their three sons aged, 25, 20 and 15, were trapped by the fire, the court heard.
Mr Lodder said Det Insp Ornellas grabbed some damp towels and used them to smother the flames.
The court heard that six minutes after the fire service was called to the Ornellas's home, they received another call to go the Brough's home, three minutes' drive away.
Sgt Brough was there with his wife, their 22-month-old son and two-day-old baby daughter, who was spending her first night at home.
Mr Lodder said Sgt Brough used a blanket to smother the flames and found two milk bottles, containing a black sock, which was being used as a wick.
Black socks found at both homes were analysed and found to contain Shell petrol, the court heard.
Officers searched Mr Brett's home and found a green petrol can containing the same kind of petrol.
Two "beanie" hats were found outside the Ornellas's home and DNA samples linked them to DeBono and Brett, the court heard.
The trial continues.