Authorities said Justin Barley, 38, of New York, is convinced that he'd shot and killed President-elect Donald Trump. (Ithaca Police Department) Justin Barley. (Ithaca Police Department)

A New York man accused of killing a UPS employee is convinced that the person he shot with a rifle this month is President-elect Donald Trump, authorities said.

Justin Barkley said during a Monday hearing, in which he attempted to plead guilty, that he had shot and killed the president-elect, Tompkins County Acting District Attorney Andrew Bonavia told The Washington Post. Barkley has been indicted on charges of second-degree murder and menacing a police officer.

After Barkley’s statement about Trump, the judge stopped the proceeding and ordered a competency evaluation, Bonavia said. Two psychiatrists will determine Barkley’s ability to stand trial.

Police said Barkley shot and killed William Schumacher at a Walmart parking lot in Ithaca, N.Y., at about 12:50 a.m. on Dec. 8. Barkley then drove his truck over Schumacher’s body before driving away, according to court records.

Officers later found Barkley’s black truck on a nearby highway and tried to stop him, but the 38-year-old kept driving a few more miles to his home in the nearby town of Dryden. Four patrol cars followed Barkley, court records say, and officers watched him get out of his truck while holding a rifle. He went inside his house, where he remained the rest of the night.

After a standoff lasting several hours, Barkley left the house and surrendered. Police later found a Remington Model 700, .30-06-caliber rifle in his basement. Court records say he also “made several admissions” to detectives.

Officer Jamie Williamson, a spokesman for the Ithaca Police Department, said that Barkley was articulate and polite to officers. He smiled when he talked and said “thank you” during a court hearing when an officer opened the door for him.

He seemed “like anybody else walking down the street,” Williamson said — except for one thing.

“He’s convinced beyond any sort of reasonable doubt that he killed Donald Trump,” Williamson said.

Authorities said Barkley and Schumacher, a 52-year-old UPS driver, did not know each other.

Susan Rosenberg, a spokeswoman for UPS, told the Ithaca Journal that Schumacher was a seasonal driver for the Atlanta-based package delivery company. He was working an overnight shift Dec. 8 and had stopped to get something to eat.

Barkley is being held without bail at Tompkins County Jail. Efforts to reach his defense attorney, Lance Salisbury, were unsuccessful.

Second-degree murder in New York is punishable by up to 25 years in prison.

Officials said they don’t know Barkley’s political affiliation or why he would want to kill — or believe he’d killed — Trump.

READ MORE:

Two tourists were killed at sea. The boat’s owner has been arrested — nearly 40 years later.

Police broke into a car to save a ‘frozen’ elderly woman — only to realize it was a mannequin

Man ‘overtaken by demons’ stabbed his family and tossed their bodies in a well, records say