Alec Baldwin stands accused of the involuntary manslaughter of cinematographer Halyna Hutchins (top right) on the set of “Rust” (bottom right).

Alec Baldwin told a judge that prosecutors made an “elementary legal error” in their charging decision that illegally placed a potential five-year prison sentence over his head in the “Rust” shooting case.

“The prosecutors in this case have committed an unconstitutional and elementary legal error by charging Mr. Baldwin under a statute that did not exist on the date of the accident,” the scathing, 11-page motion filed by his lawyer Luke Nikas states.

First reported by Law&Crime a little more than a week ago, the so-called “firearm enhancement” added to the Hollywood celebrity’s top charge was amended after the fatal shooting of cinematographer Halyna Hutchins on Oct. 21, 2021.

The earlier version of the statute, in effect between July 1, 2020, and May 17, 2022, punished “brandishing” a weapon — defined in the statute as “displaying or making a firearm known to another person while the firearm is present on the person of the offending party with intent to intimidate or injure a person.”

Nikas notes that even the government doesn’t allege that.

“The government’s statement of probable cause contains no allegation that Mr. Baldwin acted ‘with intent to intimidate or injure a person,’ and its description of the alleged conduct makes clear that the tragic death of cinematographer Halyna Hutchins was an accident,” the defense notice states.

The version of the firearm enhancement that’s been in effect since May 18, 2022, applies more broadly to the “Use, brandishing or discharge of firearm,” but Nikas argues that the Constitution forbids applying that retroactively to the shooting.

The “Ex Post Facto clauses of the United States and New Mexico Constitutions, as well basic principles of statutory interpretation” won’t allow it, Nikas notes.

“Accordingly, that enhancement should not be bound over,” the notice says. “Application of the current version of the statute would be unconstitutionally retroactive, and the government has no legitimate basis to charge Mr. Baldwin under the version of the statute that existed at the time of the accident.”

This is Baldwin’s second argument that an element of his prosecution is “unconstitutional.”

On Feb. 7, Baldwin sought to disqualify special prosecutor Andrea Reeb on the grounds that she is simultaneously serving as a Republican state lawmaker while taking on his case. The actor says that’s against the New Mexico constitution, which doesn’t allow anyone to serve simultaneously in the legislative and judicial branches.

The latest motion swipes at Reeb again, in a passage about the prosecution’s public statements about the case.

“Moreover, the District Attorney and the special prosecutor in this case have repeatedly stated to media outlets that Mr. Baldwin is facing many years in prison, while in reality he faces zero to eighteen months, even if this Court concludes at the preliminary hearing that probable cause supports the involuntary-manslaughter charges,” the notice states.

After this sentence, Baldwin’s attorney cites Reeb’s interview with Sean Hannity — in a footnote.

“Their public statements could potentially taint a jury pool by ‘heighten[ing] public condemnation of the accused’ for no legitimate purpose whatsoever given that the statements rest solely on the government’s own legal error,” the notice continues.

Baldwin asks the judge to put the enhancement off the table, “as soon as possible.”

Read the notice below: