Dale Cregan, 29, lured police constables Fiona Bone, 32, of Moray, and Nicola Hughes, 23, into the trap with a bogus call before opening fire, Preston Crown Court heard.
Nicholas Clarke, QC, opening the case for the prosecution, told the jury: "As soon as they arrived Cregan shot the officers repeatedly, until his magazine was empty."
Mr Clarke said Cregan threw a grenade at the women as he left.
The killings came after a revenge attack over a family feud in Manchester that exploded into violence, jurors heard.
Cregan is alleged to have murdered David Short, 46, and his son Mark, 23, who had rowed with another family, the Atkinsons, in the months before murdering the policewomen, the court was told.
Mr Clarke told the jury the first murder was of Mark Short, shot at the Cotton Tree pub in Manchester in May last year. He said David had been in the toilet at the time.
Two months later, the jury was told, David was shot in his home. Mr Clarke said: "His injuries were already unsurvivable and then a grenade was thrown on to him."
The prosecutor said the "uneasy peace" between the Short family and the Atkinsons broke down during a pub row in May, weeks before Mark Short was killed.
The row was between Theresa Atkinson and Raymond Young, of the Short family, the court heard.
Mr Clarke said Ms Atkinson had struck Young with a bottle, after which Mr Young backhanded her.
The jury was told she responded by shouting: "I'm going to get you done by my sons."
Mr Clarke told the court Ms Atkinson spoke to her son Leon next morning.
Mr Clarke said that Leon Atkinson contacted his two brothers and sent a text message to "old friend" Dale Cregan, who began making contact with other defendants Luke Livesey, Matthew James, Ryan Hadfield and Damian Gorman, all alleged to be involved with the Cotton Tree murder.
He added: "The shootings at the Cotton Tree were a direct reprisal."
The jury heard the Short family and friends gathered in May at the Cotton Tree pub for drinks.
Mr Clarke said police analysis showed the defendants accused of Mark Short's murder were in "close contact" before the shooting.
The prosecution claims Leon Atkinson, 35, from Ashton-under-Lyne, went to a caravan park in North Wales, for an alibi while Cregan, Livesey, 27, from Hattersley, and Gorman, 37, from Glossop, were to carry out the attack.
Hadfield, 28, from Droylsden, and James, 33, from Clayton, were to act as "spotters", the jurors heard.
But it was Atkinson who was managing and directing the operation, Mr Clarke said.
CCTV was then played to the jury which showed a car pulling up outside the pub. The prosecution say that Cregan, Livesey and Gorman were the men in the car. A figure was seen running out of the car and into the building.
Mr Clarke said Mr Young was in the bar and saw the gunman enter wearing a black balaclava.
Mark Short fell to the ground as the firing continued. Three more men, John Collins, Michael Belcher and Ryan Pridding, were also hit.
Mr Clarke said the gunman then escaped back into the car.
Cregan, Leon Atkinson, Livesey, Gorman, Hadfield and James deny the murder of Mark Short and the attempted murder of three others in the pub at the time: Mr Collins, Mr Pridding and Mr Belcher.
Accused of the murder of David Short are Cregan, Francis Dixon, 37, from Stalybridge, Anthony Wilkinson, 38, from Manchester, and Jermaine Ward, 24. All four are also accused of the attempted murder of Sharon Hark on the same day and a charge of causing an explosion. They deny the charges.
Wilkinson is also charged with possession of a firearm with intent to endanger life, which he denies.
Mohammed Ali, 23, from Chadderton, Greater Manchester, is accused of assisting an offender. He denies the charge. Cregan alone is charged with the murder of the two police officers, which he denies.
The charges span between May 25 and September 18 last year. The trial continues.