AUGUSTA — Maine lawmakers are celebrating approval of a law that creates a special treatment court for veterans suffering from drug addiction and mental illness.

The bill sponsored by Rep. Maeghan Maloney was presented in memory of Justin Crowley-Smilek of Farmington, an ex-Army Ranger who returned from Afghanistan with post-traumatic stress disorder and was shot and killed after he threatened a Farmington police officer with a knife.

Crowley-Smilek was in and out of court several times, including the day before his death, when he was ordered to seek psychological help.

The new measure, signed into law by Gov. Paul LePage on Wednesday, requires courts to screen veterans who enter the system and to coordinate with administrators at the Togus Veterans Affairs office to ensure veterans know about treatment programs.