A Queens pastor on Saturday urged mourners at the funeral of a black Manhattan man, who was slain in an alleged racial attack by a white Army veteran, to honor God with compassion for the killer.

With the coffin of Timothy Caughman resting before the pews at Mt. Zion Baptist Church, worshippers likened the 66-year-old’s stabbing death by sword in midtown to the suffering of Christ 2,000 years ago.

“Even on the white supremacist who did the crime, we still have to have compassion,” the Rev. Christopher Howard said from the pulpit of the Jamaica church, where Caughman had been baptized and where his father was once a minister.

Caughman’s funeral drew nearly 200 mourners, including New York City Mayor Bill de Blasio, his wife Chirlane McCray, and the city’s public advocate, Letitia James.

“He was attacked because of who he was, plain and simple, and don’t think for a moment it was an attack on one stray man, because it was an attack on all of us,” de Blasio said in his eulogy.

Caughman’s accused killer, James Harris Jackson, 28, of Baltimore, has been charged with first- and second-degree murder as an act of terrorism and as a hate crime. He was denied bail and is jailed.

advertisement | advertise on newsday

According to the NYPD, Jackson stabbed Caughman — whom he randomly encountered on a midtown street — multiple times in the chest and back with a 26-inch sword before fleeing.

Jackson later walked into a police station and turned himself in. The NYPD’s head of detectives in Manhattan has said Jackson told police he had come to New York to kill black people.

De Blasio has blamed Caughman’s death on what he called the “dynamic of hatred” that he said had been whipped up by the rhetoric of Donald Trump and other candidates during the presidential campaign.

“We have to understand that forces of hate have been unleashed in recent months,” de Blasio said, although he did not mention Trump on Saturday.

Caughman’s friend Portia Clarke, who led mourners in a chant of “Tim, your life matters!” said she had to restrain herself from trying to hurt Jackson at his arraignment.

Vincent Pugh, another friend, said in a poem he read aloud that Caughman “was well loved in the hood.” The poem went on to predict that “inmates would beat and taunt” Jackson.

Mourners recalled Caughman’s humble roots growing up in public housing, and dozens of his childhood friends came to Mt. Zion to say goodbye Saturday.

Caughman’s friends called him “Hard Rocks,” his childhood nickname.

Mourner after mourner recalled a dapper raconteur who befriended strangers, politicians and famous people alike for photographs, and engaged them in discussions on racism, religion, philosophy, music and current events.

He often traveled to Washington, D.C., to witness hearings held in Congress, enjoying lunch in the House of Representatives’ office building cafeteria, where he could mix with both the nation’s elite and everyday people.

advertisement | advertise on newsday

He’d finance his trips by collecting discarded bottles and cans. Caughman had been mining for the recyclables near West 35th Street and 9th Avenue when he was stabbed.

“Even if you’re collecting cans,” Howard said, “you still got dignity.”