A Brooklyn man who tried to join the Islamic State and later told an informer that the group wanted to stage an attack in Times Square similar to the one that killed 86 people in Nice, France, last summer was arrested in New York on Monday, the authorities said.

The man, Mohamed Rafik Naji, 37, who is facing charges of trying to provide material support to terrorists, began expressing support for the Islamic State, also known as ISIS and ISIL, on social media in December 2014 and traveled overseas to try to join the group three months later, according to a criminal complaint. He first went to Turkey, then to Yemen, according to the complaint.

He appeared in federal court in Brooklyn on Monday night and remained in custody, said Nellin N. McIntosh, a spokesman for the United States attorney’s office for the Eastern District of New York. He said no bail was set.

“As alleged, the defendant was persistent in his efforts to join ISIL and support its terrorist objectives,” Robert L. Capers, the United States attorney, said in a statement. Prosecutors presented no evidence that an attack in Times Square was actually planned.