A white U.S. Army veteran from Baltimore bent on making a racist attack took a bus to New York, randomly picked out a black man who was collecting bottles on the street and killed him with a sword, police said on Wednesday.

James Harris Jackson turned himself in at a Times Square police station early on Wednesday, about 25 hours after Timothy Caughman staggered into a police precinct bleeding to death.

Jackson, who was arrested on suspicion of murder, told police he’d harbored feelings of hatred toward black men for at least 10 years, authorities said. He travelled to New York on March 17.