Mary Kay Letourneau -- the former teacher imprisoned after pleading guilty to raping her student, whom she later married -- is dead after battling stage 4 colon cancer ... TMZ has learned.

Mary's now-estranged husband, Vili Fualaau, previously shared her stage 4 cancer diagnosis on Instagram, sharing a photo of himself wearing a medical mask with the caption, "Praying for a miracle."

Her attorney, David H. Gehrke, tells us Mary Kay had been in hospice care for the past month, and Vili had been by her side ... helping take care of her.

Mary and Vili notoriously made headlines in the late '90s, as she was 34, married and had 4 children when she began having sex with him -- her 6th grade student. He was either 12 or 13 at the time.

She pled guilty in 1997 to 2 counts of felony second-degree rape of a child and ended up serving 7 years in prison.

Mary gave birth to 2 of Vili's kids, and they wed in 2005 after she was released from prison. TMZ broke the story ... the couple split in 2017.

We contacted a spokesperson for Vili and they would only say it's a very hard time right now.

tag