A lockdown street party in Manchester where two men were later shot dead was "unachievable" to safely disperse, said police.
A 36-year-old-man and a 21-year-old man both died in hospital after reports of gunfire near Caythorpe Street, Moss Side, at about 12.55am on Sunday.
Hundreds of people are thought to have attended the unplanned gathering hosted by a DJ after an earlier Black Lives Matter event in Moss Side - monitored by Greater Manchester Police (GMP) - passed off without incident.
Senior officers opted not to break up the party as people crammed into a residential courtyard, although police admitted they had taken calls from concerned members of the public between 10pm and midnight.
Superintendent Mark Dexter said: "A decision taken last night in respect of the event that was unplanned was that it would be unachievable to safely disperse given the nature of the event and the people that were present and the numbers.
"We have to consider the risk of public disorder and confrontation with people at that time of night."
He added that police received no intelligence that a serious incident could happen.
GMP set up a dedicated operation this weekend to tackle the problem of illegal raves in the area.
Last weekend a 20-year-old man died of a suspected drug overdose, an 18-year-old woman was raped and three men were stabbed at events in Trafford and Oldham attended by more than 6,000 people.
Announcing the operation Assistant Chief Constable Nick Bailey conceded there could be occasions in which senior officers decide it is too dangerous to close down a rave due to its scale and factors such as terrain and darkness but he vowed action would be taken to gather enough evidence to secure convictions.
While Andy Burnham, the Mayor of Greater Manchester, added that such events may happen again but said "there is no question of us turning a blind eye or adopting a permissive approach"
Roads in Collyhurst, Manchester, were temporarily closed on Saturday into the early hours of Sunday after reports of an illegal rave but no party took place.
No arrests have been made in connection with the Moss Side shootings.
A cordon is in place surrounding the courtyard between Caythorpe Street, Broadfield Road and Bowes Street.
A forensic tent partially covered a Skoda car, with litter strewn across the ground including bottles of alcohol and canisters of laughing gas, also known as "hippy crack".
A primary school teacher, who lives a couple of streets away, said he heard loud music from about 10pm and that it continued past midnight as he and his wife went to bed.
The man, who did not wish to be named, said: "It's a really normal neighbourhood with an occasional spike in violence.
"I had a walk out to see what was happening and I would say there were hundreds of people around but I did see police patrols. Later, we heard a helicopter overhead."
He said he did not feel a need to call 999 because the police were already there, but others did and were told that officers were unable to break the party up because it was too large.
Moss Side ward councillor Mahadi Sharif Mahamed said: "I want to make it clear the incident that led to the tragic event had no connection to the community event.
"Once you have an open event where people can come and take part, you will always get people from outside the area.
"The Black Lives Matter event was organised and peaceful. We need to look at ways we can control future events and see what we can do to make sure when planned events finish these events that pop up afterwards do not happen in the future."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here