A former middle school cafeteria worker in Minnesota has pleaded guilty to sending sexually explicit text messages and nude pictures to a 15-year-old student.

Krista Ann Muccio, 44, of Inver Grove Heights, pleaded guilty Thursday to a felony count of sending sexually explicit content to a minor after arguing for years that the messages she sent to the student were constitutionally protected free speech under the First Amendment, KARE reported.

The Star Tribune reported that Muccio entered the guilty plea under the condition that the court would drop a charge of possessing pornographic work involving minors.

In November 2014, Muccio—a lunch lady at Inver Grove Heights Middle School—used Instagram’s direct messaging feature to send explicit photos to a 15-year-old student and asked that he send “something in return,” according to the Twin Cities Pioneer Press.

Court documents say the male student responded to the message with explicit photos of his own. A criminal complaint states that the student knew Muccio since he was in eighth grade.

After the boy’s father found the explicit photos saved to an iPad, local authorities began investigating the middle school cafeteria worker.

Muccio reportedly admitted to exchanging explicit content with the boy via Instagram since June 2014.

Muccio’s attorneys tried to argue that Minnesota’s “sexting” law was unconstitutional in Dakota County District Court because they claimed the pictures and texts could be considered First Amendment-protected free speech.

The Minnesota Supreme Court, however, ruled in June 2016 the state law does not violate the Constitution, reversing a state appeals court decision on the matter.

“This statute was enacted for the important purpose of prohibiting sexually explicit speech directed at a child that is intended to cause sexual arousal,” Dakota County Attorney Jim Backstrom said in a statement. “We are pleased to bring Krista Muccio to justice for violating this law.”

Muccio is due back in court for sentencing on April 6.