A 22-year-old jihadist wannabe from Connecticut who said he wished the US would “burn in fire” has been arrested while making arrangements to travel to Turkey on a cargo ship to join ISIS, according to federal officials.

Ahmad Khalil Elshazly was arrested Sunday on charges of attempting to provide material support to a foreign terrorist organization.

Elshazly, a US citizen, last year made “numerous statements to others, both in person and through online messaging applications, expressing a desire to travel to Syria and the surrounding area to fight on behalf of ISIS,” according to a court filing.

In February, he said he had saved about $1,000 to use for travel to Jordan and Syria in order to be with ISIS, officials said.

“I want to go to the caliphate and fight there. I can kill maybe … like a hundred kaffir. I can kill them. A hundred kaffirs,” he told people in the presence of government informants in October, referring to infidels, according to prosecutors.

“If I do something here how many kaffirs could I kill? One, two, three and then I get shot and I die. It is more benefitting if I go there, I could kill more and will get more faithful rewards,” Elshazy added.

“They say, War has started and we are marching to it … but all doors are closed, closed. I am talking to myself now, asking myself, How do I get there? How can I help Muslims? How can I do anything?” he told informants, according to the charging documents.

“God willing! May this country [United States] burn the same way they burned Muslims! May they burn in fire at the end!” he allegedly said.

When he was asked to lower his voice when talking loudly in public, Elshazly declared, “I am not scared,” officials said.

Elshazly also sent someone several YouTube videos explaining how high-powered firearms and other weaponry work, according to the Department of Justice.

He ultimately decided against traveling to the Middle East by plane amid concerns that he’d be stopped by law enforcement, and decided to take to the high seas instead, a government informant said.

On Saturday, he paid another informant $500 for transport on a fishing boat that would take him to a container ship headed for Turkey — but he was arrested at a marina in Stonington, Connecticut, as he approached someone he thought was the captain of a fishing boat, according to the documents.

“The National Security Division is committed to identifying and holding accountable those who continue to seek to provide material support to foreign terrorist organizations,” Assistant Attorney General for National Security John Demers said in a statement Monday.

On Monday, a federal judge in New Haven ordered Elshazly held without bail. He faces up to 20 years behind bars.