Efforts to tackle gang-related violence are being hampered by confusion over the complex law on joint enterprise, which could deter witnesses from coming forward, according to a report by the Commons justice select committee.

The intricately developed legal doctrine – which makes a person who agrees to commit a crime with another, liable for all criminal acts committed by the other person – is applied inconsistently and there is urgent need for clearer advice for prosecutors, the MPs have warned.

In some cases over-zealous application of the principle, particularly with gang fights, can discourage witnesses from volunteering vital information that would solve killings for fear they end up on trial for murder.

The MPs' report states: "Over-charging under joint enterprise will not assist the task of those trying to deter young people from becoming involved in gangs.

"It may also deter potential witnesses to an offence, who fear they might be charged under joint enterprise if they come forward, impeding the justice process.

"We recommend the director of public prosecutions issues guidance on the proper threshold at which association potentially becomes evidence of involvement in crime. Such guidance should deal specifically with murder."

The committee heard evidence that the law was leading to miscarriages of justice. The report notes: "The Prison Reform Trust is concerned that joint enterprise may be used disproportionately in cases involving children and young adults, and can act as a dragnet, bringing individuals and groups into the criminal justice system who do not necessarily need to be there."

There are no statistics on the use of joint enterprise, but evidence is accumulating to "suggest that the doctrine is causing some confusion in the courts", the report says. "Joint enterprise has been the subject of a high number of appeals in recent years."

The committee acknowledged that the law on joint enterprise and secondary liability was developed to ensure that all participants in a criminal enterprise could be held accountable.

But it said: "The Crown Prosecution Service and the police should have in mind that it is not the purpose of the law of joint enterprise to foster gang mentality or draw people into the criminal justice system inappropriately."

The report calls on the Ministry of Justice to take immediate steps to ensure that "joint enterprise should be enshrined in statute to ensure clarity for all involved in the criminal justice system".

It recommends that the director of public prosecutions issues urgent guidance on the use of the doctrine when charging and "collates data on the number of people charged under joint enterprise so that problems with the operation of the law, identified by campaigning groups representing both victims and those that say they have been convicted in a miscarriage of justice, can be alleviated".

The committee's chair, Sir Alan Beith, said: "This area of law is vital to ensuring the prosecution and conviction of criminals involved in gang-related violence in particular, but is now so complex that juries may find it impossible to understand how to reach the right verdict.

"This issue should not wait for a general review of the law of homicide which few governments would be willing to undertake.

"The law on joint enterprise has a role in deterring young people from becoming involved in gangs, but confusion over the law and how it works can put vital witnesses in fear of coming forward, allowing the real criminals to escape justice.

"It is also important to ensure young people are not unnecessarily brought into the criminal justice system when they are on the edge of gang-related activity."

In response to the report, the director of public prosecutions, Keir Starmer QC, agreed to preparing fresh guidance. "Having studied the report and considered its content I have decided the CPS will now produce guidance on the approach we will take to cases of joint enterprise, including guidance on the proper threshold at which association potentially becomes evidence of criminality."

This exercise will be done through consultation, with interested parties, on draft guidance in due course, and, as with all CPS guidance, it will be kept under review.

"The CPS will also now consult with the Ministry of Justice on the best way forward for collating statistics around cases involving joint enterprise."