LARGO — A man was sentenced to 20 years in prison on Friday for sending an interracial couple a series of letters that amounted to a "violent, vile, disgusting, racist, veiled threat," in the words of a judge.

Allan Dale Richter, 57, had already pleaded no contest to aggravated stalking and more than a dozen counts of distributing obscene material.

He came to a court hearing Friday to learn his fate. Assistant State Attorney Christopher Klemawesch displayed several of the letters Richter mailed, which contained racial slurs and curse words and urged one of his neighbors to go back to Africa.

Richter addressed his letters to "Buckwheat" and "Jezebel," along with other names, and often included a photo of an overweight nude black woman in a sexual pose, along with his handwritten comments such as: "Iz dis yo' mammy or yo' sista." Another letter referred to "O-Bomb-A," which raised deputies' concerns about possible violence.

Pinellas-Pasco Circuit Judge Chris Helinger, after calling these letters veiled threats, said, "I can't imagine what these people lived through for two and a half years. In my mind, they're lucky they're not dead."

Pinellas Sheriff's Sgt. John Spoor said he discovered thousands of rounds of ammunition in Richter's home, but no firearms. He tied the crime to Richter after a partial fingerprint on a letter matched an old arrest of Richter's in Texas.

Defense attorney Bruce Denson argued Friday that Richter's improper behavior was the result of his mental illness.

A psychologist who has treated Richter since 1996 said he suffers from paranoid schizophrenia and responds well to medication. But when Richter's mother died a few years ago, he lost a stern influence who demanded he take his pills regularly. Richter's father tried less successfully to look after him, but he died also. A brother did what he could, but lived out of state.

Denson asked for a sentence of probation, with the condition that Richter be sent to an assisted living facility and given his medicine regularly. But Helinger said that option would not keep the community safe.

Richter spoke at the hearing and blamed his behavior on his mental illness and being off his medication.

The two who received the letters were Amy Query, who is white, and Nathan Maingi, who is black and from Kenya. Query said the letters made them wonder if they were being watched and stalked.

"It was kind of like being in your own prison," she said.

Maingi, who came to the United States in 2003, said "in the years I've been here, I have never felt any racism" until the letters started to arrive.

After the sentence on Friday, Query said she finally felt relief. "This is what we were hoping for."