NEW YORK (Reuters) - Tairod Pugh, a U.S. Air Force veteran convicted of attempting to join Islamic State, was sentenced to 35 years in prison on Wednesday after delivering an impassioned speech in which he maintained his innocence and decried what he called the United States’ racism and Islamophobia.

“I am a black man. I am a military man. I am a Muslim man,” Pugh said at his sentencing hearing in Brooklyn federal court. “I protected this country and the Constitution. And my service was repaid by dishonoring my name.”

Pugh, who spoke for about half an hour before U.S. District Judge Nicholas Garaufis cut him off, said he had done nothing wrong, and was treated unjustly because of his race and religion.

“My only regret is that it’s taken me so long to recognize how frightened and racist my country has become,” he said.

But Garaufis said jurors had ample evidence to convict Pugh last March, including Islamic State propaganda videos found on his laptop and posts he wrote on Facebook supporting the extremist organization.

“This isn’t about whether you’re Muslim or Christian or Jewish,” the judge said. “This is about whether you’re going to stand up for your country, or betray your country, which has done so much for you.”

“You’ve made your choice, sir,” Garaufis continued, immediately before imposing the sentence. “I have no sympathy.”

Pugh’s attorney, Susan Kellman, said after the hearing that Pugh would appeal his conviction and sentence.

Pugh, 49, was found guilty after a week-long trial of attempting to provide material support to a designated terrorist organization, and obstruction for destroying four portable electronic storage devices after his detention in Turkey.

Prosecutors said Pugh bought a one-way plane ticket from his home in Egypt to Turkey in 2015 planning to cross the Syrian border into territory controlled by the Islamic State. He was detained in an Istanbul airport by Turkish authorities, found carrying maps of Islamic State territory and border crossings into Syria.

Prosecutors also pointed to a letter addressed to his wife, found on his laptop, in which he vowed to fight for Islam.

Pugh said on Wednesday he intended to fight the government of Bashar al-Assad in Syria, not join the Islamic State.

Pugh served as an avionics specialist in the Air Force from 1986 to 1990 and later worked as an Army contractor in Iraq from 2009 to 2010, according to federal prosecutors.