Updated

A former Norwich substitute teacher has reached a plea deal to end a long-running case in which she was accused of exposing middle school students to online pornography.

Julie Amero, 41, pleaded guilty Friday to one count of misdemeanor disorderly conduct in Norwich Superior Court. She will give up her teaching license and pay a $100 fine.

Amero was convicted in 2007 of four counts of risk of injury to a minor.

The charges stemmed from an 2004 incident in which pornography appeared on her classroom computer in view of several seventh-graders.

Amero and several computer experts believe the computer was infected with programs that caused the images to pop up beyond her control.

A judge threw out her conviction after an analysis of the computer's hard drive, concluding testimony against Amero was "flawed."

• Click here to visit FOXNews.com's Cybersecurity Center.

Amero, who had no criminal record, was awaiting a new trial when she pleaded guilty Friday to the disorderly conduct charge to end the case.

"Oh honey, it's over. I feel wonderful," Amero told The Hartford Courant a few minutes after entering her plea. "The Norwich police made a mistake. It was proven. That makes me feel like I'm on top of the world."

The case started in October 2004 when Amero was assigned to a class of seventh-graders, a few of whom had been looking at a Web site on hair styles.

Amero said that after class started, pornographic images started popping up on the computer screen by themselves and she could not stop them.

She said she was under strict orders to leave the computer on, since it was used to track attendance and perform other tasks.

Several students testified during the three-day trial that they saw pictures of naked men and women, including at least one image of a couple engaged in an intimate sexual act.

Amero could have faced up to 40 years in prison after being convicted of four counts of risk of injury to a minor.

Her supporters — including a cadre of computer experts — say unseen spyware and adware probably infected the old computer, and that it lacked firewall protections to block the inappropriate content.

Prosecutors argued at her trial that Amero visited the sites, then failed to shield children from seeing the images.

Technology specialists hired by the defense team examined the computer twice before Amero's trial, but were not allowed to testify about some of the information they believed could have exonerated her.

They raised enough questions, however, to prompt prosecutors to seek their own analysis.

After the trial, prosecutors sent the hard drive to the Connecticut State Police forensics laboratory, where an analysis found evidence that contradicted the state's expert witness.

Amero had rejected an offer of a special form of probation for first-time offenders that would have left her record clean, insisting she was innocent and choosing to fight the state's case.

New London County State's Attorney Michael Regan said Friday that the state was prepared to go to trial again, but agreed to the reduce the felony charges to a single misdemeanor count of disorderly conduct because Amero had health problems.

"I have no regrets. Things took a course that was unplanned," Regan said. "For some reason, this case caught the media's attention."