An Oregon politician has confessed to penning a racist letter to himself after he initially claimed it was anonymously sent to him, authorities said.

Jonathan Lopez, who is Latino and was a recent commissioner candidate in Umatilla County, claimed he discovered the hate-filled missive in his mailbox on June 23, the East Oregonian reported.

On his now-deleted Facebook account, he shared a photo of the letter, which said that Lopez and other “Mexicans” were “not welcome here,” according to local news station KEPR-TV.

7 MEN ARRESTED AFTER HARASSING BLACK FAMILY WITH NAZI SALUTES ON OREGON BEACH: POLICE

“Don’t waste your time trying to become anything in this county we will make sure you never win and your family suffers along with all the other f–king Mexicans in the area!” the letter said.

Lopez wrote in the post that he “holds no resentment for whomever wrote this,” the outlet reported.

“I’m just simply heartbroken for the lack of knowledge, education and respect missing,” he said. “I pray for you and wish you prosperity in your life.”

But when authorities followed-up with Lopez about the alleged incident, he confessed to writing the letter himself.

OREGON MAN DRIVING STOLEN VEHICLE CRASHES INTO WOMAN DRIVING STOLEN CAR: POLICE

“Our investigation has shown that Mr. Lopez wrote the letter himself and made false statements to the police and on social media,” Hermiston Police Chief Jason Edmiston told the East Oregonian.

“The end result is a verbal and written admission by Mr. Lopez that the letter was fabricated.”

Edmiston said the case would be forwarded to the Umatilla County District Attorney’s office for review on charges for initiating a false report.

“This investigation is particularly frustrating as we are in the midst of multiple major investigations while battling a resource shortage due to the current pandemic,” Edmiston told the outlet.

“The time spent on this fictitious claim means time lost on other matters, not to mention it needlessly adds to the incredible tension that exists in our nation today.”

CLICK HERE FOR THE FOX NEWS APP

Lopez — who lost a primary election for the commissioner seat in May — claimed that he never intended to file a police report about the bogus letter.

“I never meant to file a report, it just kind of spiraled out,” Lopez told the newspaper.

This article first appeared in the New York Post.