A Florida prosecutor said Tuesday that he would seek the death penalty against the man accused of killing 17 people last month at a high school in Parkland, moving the state closer to a rare trial for someone charged in a mass shooting.

Michael J. Satz, the state attorney for Broward County, made his decision public less than a month after the rampage at Marjory Stoneman Douglas High School, and one day before students nationwide were expected to stage walkouts to demand new gun-control measures.

The decision to seek the death penalty against Nikolas Cruz, 19, was widely expected, in part because Mr. Satz had hinted at his plans days after the attack. Lawyers for Mr. Cruz, who have repeatedly said that he would plead guilty in exchange for life in prison without the possibility of parole, are not expected to contest his guilt at what is certain to be an agonizing and emotional trial. They will instead focus on proving mitigating circumstances, such as extreme mental duress, that could persuade a single juror to block a death sentence.

But in a filing in Circuit Court in Broward County, Mr. Satz cited seven aggravating factors that he said prosecutors would prove and that would make Mr. Cruz eligible for execution. Those factors, enshrined in Florida law, include that Mr. Cruz “knowingly created a great risk of death to many persons” and that the capital felony at issue was “especially heinous, atrocious or cruel.”