Los Angeles courts reporter Brian Melley was enjoying a Sunday afternoon when a longtime legal source reached out with a remarkable tip in the case of Edward Gallagher, a Navy SEAL facing a court martial on charges he murdered a teenage Islamic State fighter in Iraq in 2017.

It’s exceptionally unusual for a SEAL to face murder charges for a battlefield incident and the case has roiled one of America’s elite fighting forces and attracted the attention of President Donald Trump.

The source told Melley that military prosecutors, frustrated by leaks in the case, planted tracking software in emails sent to defense lawyers and a Navy Times reporter. The unsophisticated software was quickly discovered by the recipients.

Melley tracked down and interviewed two attorneys who received the emails and the Navy Times reporter. The lawyers told Melley that when confronted prosecutors eventually acknowledged the effort, though they wouldn’t explain more about what they did. The lawyers said the move may have violated attorney-client protections, constituted an illegal search and trampled on press freedoms.

Melley began working up the story that night and sent emails to the prosecutor and the Navy for comment. Early the next morning, he followed up on those attempts for comment and interviewed a military law expert who said he’d never heard of such a tactic and thought it was ethically, legally and intellectually dubious.

Military reporter Julie Watson in San Diego helped Melley get additional information from the Navy and provided more background on the story from her previous reporting on the case.

With the story fully reported, Melley’s APNewsBreak hit the wire Monday morning and quickly gained traction online. AP was widely credited everywhere it appeared, and no major media outlet matched it. Only one news outlet, a military news website named Task & Response, had its own piece hours later but still credited AP, naming Melley in its story.

For giving AP an exclusive on an important military justice story, Melley wins this week’s Best of the States award.