A Brooklyn man who allegedly supported ISIS and traveled to Yemen to join the militant group was arrested at his home Monday on terrorism charges, officials said

Mohamed Rafik Naji, a permanent U.S. citizen who was born in Yemen, faces charges he gave material support to the Islamic State. Authorities also say he tried to join the terror group during a trip to Yemen last year. His lawyer, Susan Kellman, said the trip to Yemen was “legitimate” because "he has family there.” 

But U.S. Attorney Robert Capers said “as alleged, the defendant was persistent in his efforts to join ISIL and support its terrorist objectives,” referring to another name for the terror organization. “We will continue to identify and prosecute individuals like Naji who seek to empower our nation’s enemies and endanger our citizens and partners around the world.”

Naji offered support to ISIS following the July attack in Nice, France, which killed 86 people and injured more than 400, according to the charges. He also told undercover FBI agents he supported planning an attack in Times Square, though one was not carried out, the charging documents state.

Investigators said Naji posted support for ISIS on Facebook and had the group’s flag in his profile and cover photos on the social media site.

Naji is being held without bail. Court officials said he was a driver for Uber, but the car service company has denied he was an employee.