PORT ORCHARD, Wash. - A Washington man has pleaded guilty to the rape and killing of a 6-year-old girl and faces a minimum 40-year sentence.

The Kitsap Sun reports that 21-year-old Gabriel Gaeta of Bremerton pleaded guilty Friday in Kitsap County Superior Court to first-degree murder and first-degree rape in the 2014 death of 6-year-old Jenise Wright. Gaeta was 17 at the time of the attack, and was charged as an adult.

Authorities arrested Gaeta in August 2014, but in February 2017 he was found incompetent to stand trial. He was medicated at Western State Hospital so he could be returned to a mental state where he could stand trial.

Get Breaking News Delivered to Your Inbox

An FBI team with search dogs discovered the girl's body covered by a wood pallet and submerged in a muddy bog in woods near her Bremerton home.

Authorities say they linked evidence found near the girl's body to the DNA of Gaeta, a high school student with no criminal history. A search of his home reportedly turned up a blood- and mud-covered shirt and a bloody towel in his bedroom.

Court records say Jenise Wright suffered blunt-force trauma to the head and was strangled and sexually assaulted.

She was last seen by her parents when she went to bed Aug. 2 in her family's mobile-home. Officials have said there were no signs of forced entry at the residence.

Gaeta has been described by James Wright, Jenise's father, as a close friend of the family. His residence was two homes away from the access point to a wooded trail that led to where the body was found, according to court documents.

Gaeta is scheduled to be sentenced on May 21.