The Supreme Court has turned away pleas by New York City and gun violence victims to hold the firearms industry responsible for selling guns that could end up in illegal markets.

The justices’ decision Monday ends lawsuits first filed in 2000. Federal appeals courts in New York and Washington threw out the complaints after Congress passed a law in 2005 giving the gun industry broad immunity against such lawsuits.