A Brooklyn man has been arrested for plotting a terror attack on Times Square and trying to join ISIS at least five times, according to a complaint unsealed Monday.

Mohamed Rafik Naji, 37, is charged with traveling to Turkey and Yemen between March and September of last year in an effort to join the terror group, court papers filed in Brooklyn federal court say.

But in emails exchanged with his girlfriend back in the US, the Yemen-born man disclosed he faced problems crossing into ISIS-controlled areas.

“It’s very hard to get in I’m on my 5 try its difficult mad po po military and ppl here very scared,” he allegedly wrote to his girlfriend.

Naji also hit up his lover several times for cash to fund his terrorist endeavors.

“Hunny 1 last favor $2 grand for plane ticket and to get back I promise I’ll pay u back when I get there,” he wrote her on April 4, 2015. “It’s hard then [sic] I thought m [sic] tired hiding n mountains for 3 weeks it’s very very hard wallah,” he added using the Arabic expression for “I promise by God.”

Naji allegedly sent the girlfriend video files of his “first day on the job” on April 21, 2015 — around the same time when ISIS was known to be fighting in Yemen — in which gunshots and male voices can be heard, the papers say.

Days after the terror attack in Nice, France in July, Naji was caught on wiretaps discussing with a confidential source plans to stage a similar attack in Times Square.

Click to read more from the New York Post.