A series of text messages from Walmart inspired a North Carolina man to confess to killing a woman and dumping her body in a river 17 years ago.

Matthew Gibson, 55, of Watauga County, N.C., drove to Arizona to confess to cops that in 1997, when he was a meth and coke addict, he met a woman in Bullhead City, Ariz., and invited her back to his trailer, then beat her to death and dumped her body in the Colorado River after she began to annoy him, the Charlotte Observer reports.

Recently, he started getting text messages from Walmart saying Anita Townshed's prescription was ready. He became convinced Townshed was the woman he killed and that someone was out to get him.

"In his own mind...somebody knew what happened after all these years," Det. Alicia Marquez told the newspaper.

It turns out his confession was true, but the victim's name is Barbara Brown Agnew.

Gibson pleaded guilty to manslaughter and was sentenced to 10 years.