Self-avowed racist James Jackson pleaded guilty Wednesday morning to killing a black man with a sword in 2017, part of his plan to stop interracial relationships and express his hatred for black people.

Authorities described the gruesome murder of Timothy Caughman, 66, as a hate crime.

Jackson killed the homeless man while Caughman was collecting bottles for recycling. Caughman is remembered as a kind neighbor and "gentleman," according to the Associated Press. He went to the police station after he was attacked before dying in a hospital.

Jackson, who now faces life in prison, was 28 when he traveled from Baltimore to New York City to act. He chose New York because it is the "media capitol of the world" and for its multicultural history, according to authorities.

"James Jackson prowled the streets of New York for three days in search of a black person to assassinate in order to launch a campaign of terrorism against our Manhattan community and the values we celebrate," the district attorney, Cyrus R. Vance, wrote when he announced the charges in 2017.

Though Jackson turned himself in to authorities, he called the killing a "practice run" in a 2017 interview. He told authorities he hated black men for at least a decade, though he did not mean to kill an elderly man. He was trying to kill "a young thug" or "a successful older black man with blondes … people you see in Midtown. These younger guys that put white girls on the wrong path."

Jackson will face sentencing on Feb. 13 for his guilty plea to murder charges, the Associated Press reported.

Vance tweeted Wednesday that " this won't bring back Timothy Caughman, a beloved NYer who was executed for being black." But he acknowledged that the latest development in the case was "the loudest message that a civil society can send to would-be terrorists."

Jackson is a veteran from Baltimore who served in Afghanistan. He previously told the New York Daily News that he was raised by "typical liberal" parents, though he rejected multiculturalism.

Jackson also told the newspaper he read the website the Daily Stormer, which South Carolina church gunman Dylann Roof, who was sentenced to death for killing nine black people at a bible study in 2015, also read.

Contributing: Mike James