THE shootings of 20 children and six educators in Newtown, Conn., have elicited outpourings of sympathy and grief throughout the nation and around the world. While much of the discussion about how we should respond to this tragic event has appropriately focused on guns and what steps we might take to limit the toll of gun-related violence, the Newtown shooting, like others before it, has also focused public attention on how we as a society treat and care for the mentally ill — and on how our justice system should address the complex interaction between mental illness and criminal activity.

While it is too early to know with any certainty what role mental illness may have played in the mass shooting by Adam Lanza, the incident is just one of many (including the murder of five by Ian Stawicki in Seattle in May) where some form of mental illness has been identified as a factor in a devastating crime.

In each instance the same questions surface about the availability and quality of mental-health services and the possibility that early diagnosis and treatment might have prevented the tragedy, and about how our criminal-justice system should respond to crimes committed by the mentally ill.

As with issues surrounding guns, there is a wide spectrum of ideas and suggestions for how to address these concerns. Here in Seattle, an innovative collaboration between the justice system and social and health services professionals offers an effective alternative approach to the traditional treatment of these issues by our criminal-justice system.

The Seattle Mental Health Court was the first problem-solving municipal court in the country designed to address the special circumstances of mentally ill defendants facing misdemeanor charges. Now in its 14th year, it is recognized as one of the leading and highest-volume such courts in the country.

It is one of the few that operates as both a competency and a therapeutic court, protecting the rights of incompetent clients and offering those deemed competent assistance with housing, treatment, chemical dependency and other services.

Prosecutors, defense attorneys, mental-health counselors, police and others work together to implement a program of support and supervision that meets the goals of improving the quality of life for each client while protecting public safety and reducing system costs.

Through the court, relevant services are made available to criminal defendants who have the potential to benefit from them. Programs linked to the court have immediate beds for substance-abuse treatment, spots in transitional housing, access to mental-health care and other services. The Seattle Police Department has a crisis-intervention team with officers specially trained to look for signs of mental illness, two of whom work directly with the court. Statistics show those who stay with the court program for two years have an 83 percent reduction in criminal behavior.

Our law school has had the good fortune to be able to cooperate with Associated Counsel for the Accused, the nonprofit public-defense firm that represents clients in Seattle Mental Health Court. Since 2010, third-year students in our Mental Health Court Clinic have had the opportunity to develop the skills necessary to advance the interests of this vulnerable client population in the court’s distinctive collaborative setting. These students have brought the lessons from their experience back to the law school, engaging in thought-provoking conversations with other students engaged in traditional adversarial advocacy, and then they have taken these lessons with them as they enter the profession.

While the availability of this kind of court might not have prevented the recent tragedies in Connecticut, Oregon, Colorado and far too many other places in this country, this collaborative approach puts protections in place that could turn around a person with mental illness who poses a threat while he or she can still be helped.

There were no mental-health courts before 1997, but there are now more than 200 in the country. The search for ways to make our communities safer should include serious consideration of creating more collaborative mental-health courts along the model that has proved successful here in Seattle.

Mark Niles is dean and professor of law at Seattle University School of Law.