He wanted to “live in a tent” with ISIS — but is facing federal lockup instead.

An Arizona man accused of acting as a recruiter for ISIS told friends he wanted to live in squalor with the terrorists — and praised them for “forcibly” taking over cities in Iraq, it emerged at his Manhattan federal trial Thursday.

“Allah is great. Mosul falls by the hands of the state,” Ahem Mohammed el Gammal said after ISIS took over the Iraqi city in 2014.

“No caliphate came by deliberation. All by the sword. It has to be taken like this,” el Gammal told a pal on Facebook. “We will take it forcibly. Not peacefully.”

Then el Gammal blasted his comfy life as the owner of a small business that imported machines used to fix vehicles.

“I am willing to live in a tent under an Islamic state instead of all luxuries under an infidel state,” el Gammal, 44, wrote in the post.

Prosecutors introduced the Facebook posts in an effort to prove to the jury overseeing the trial that el Gammal saw himself as a supporter of ISIS.

He stands accused of illegally supporting the terrorist organization by helping a Baruch College student travel to Syria through Turkey in 2015.

“I’m in contact with someone from the company. Directly inside the company,” the student, Samy El-Goarany told el Gammal after he arrived in Turkey in 2015.

“The sooner I can start the internship the better,” El-Goarany said.

The government has said “company” was code for ISIS and “internship” was code for military training. They also said el Gammal deleted the bulk of his posts with El-Goarany after the kid made it to Syria.

El Gammal’s lawyers have argued that their client did not even know about El-Goarany’s ISIS ambitions, much less help him with them.

They have painted their client as a Red Bull-drinking, Marlboro-smoking, fan of ex-President Jimmy Carter — who often said things to push people’s buttons.

The Manhattan federal court trial continues Friday.