Charges have been dismissed against Thomas Sander, who was accused of setting fire to Dickinson Trinity High School in March.
Southwest District Judge William Herauf, approved a prosecutor's request to dismiss the state's case without prejudice against Sander.
Prosecutors earlier had charged Sander, with arson and endangering by fire.
They said he started a fire that destroyed Trinity High School on March 3 and endangered the life of a teacher who lived in an apartment at the school.
Sander pleaded not guilty.
Prosecuting attorney Tom Henning filed the motion to dismiss Thursday.
Herauf had ruled two days earlier that Sander was not read his rights before part of a police interrogation and that some of his statements were coerced.