Two men who the authorities said intended to carry out a terrorist attack in New York City were arrested late Wednesday, two law enforcement officials said.

Details were not immediately available, and the identities of the men were not released. A law enforcement source characterized the suspects as “homegrown,” and another said they were of North African descent.

The case was being prosecuted by the Manhattan district attorney’s office, and law enforcement officials said the men were expected to be charged under New York State’s terrorism law.

Major terrorism cases are generally investigated by the Federal Bureau of Investigation and prosecuted by the United States attorney’s office in federal court. But in this case, a law enforcement official said, one official had told the F.B.I. it was not a terrorism case.