Federal authorities charged a Brooklyn man on Monday with allegedly traveling to Turkey and Yemen last year to join the terror group ISIS with the goal of a vehicle-based attack in Times Square similar to the one carried out in Nice, France over the summer.

Mohamed Rafik Naji, 37, is accused of traveling to both countries from March to September 2015 in the hopes of joining ISIS, according to the federal complaint.

Naji was held without bond in federal court in Brooklyn on Monday. An attorney for Naji did not immediately respond to a request for comment.

The arrest comes just over a week after ISIS encouraged vehicle-based attacks in their online magazine, Rumiyah. The magazine article called the Macy’s parade “an excellent target” and showed a photo of a U-Haul truck, calling it “an affordable weapon.”

Naji, who is a Yemeni citizen and has permanent resident status in the United States, allegedly started writing pro-ISIS posts on Facebook in September 2014, according to the federal complaint, including posting a photo of a pair of men holding guns and walking on a dirt road toward the ISIS flag superimposed on the sky.

On March 16, 2015, he allegedly boarded a plane to Istanbul from Kennedy Airport, and three days later emailed his girlfriend in America about his efforts, telling her “I love u hunny [sic] so much.”

According to the complaint, Naji also asked his girlfriend for money and, at one point, said he “almost got killed today by army it’s been 6 day we hiding n mountains trying sneak n no food no water,” asking her for prayers.

On Sept. 12, 2015, Naji got back to JFK. And in July 2016, he allegedly said he wanted to stage an attack in Times Square similar to the one in Nice, France just days earlier.

“The arrest of Mohamed Rafik Naji on charges he provided material support to ISIL is a sharp reminder of the evolving threat of global terrorism,” Gov. Andrew Cuomo said in a statement on Monday.

“New York must remain vigilant in the face of hate and intolerance, and continue to advance the core values of democracy that this state and nation were founded upon. While we do not have any specific threat at this time, public safety is paramount and we will continue to work aggressively with all local and federal partners.”