EXCLUSIVE

Olympic gymnast McKayla Maroney says she was under 18 when the hacked nude photos of her were taken ... and now she's taking legal action against several porn sites that reposted the images.

TMZ has learned one of Maroney's attorneys fired off a letter to Porn.com ... informing the site that McKayla was underage in several of the photos. The letter demands the images of McKayla -- who turned 18 last December -- be taken down immediately.

Another attorney for the gymnast sent a different letter to multiple websites stating Maroney owns the copyright on the hacked photos.

The legal claims by her attorneys are a strong indication the photos really do show McKayla -- even though she said on Twitter they were "fake photos." It's also possible only portions of the images are really McKayla. The letter is not specific.