CENTRAL ISLIP, N.Y. — U.S. officials on Friday arrested a 25-year-old man in a New York suburb and charged him with trying to travel to Yemen to join al-Qaida in the Arabian Peninsula, one of the most active wings of the militant network.

The man, Marcos Alonso Zea, pleaded not guilty to the charges contained in court papers unsealed on Friday contending he sought to join and provide aid to the group, which the United States regards as one of the most active wings of the militant network.

Appearing in U.S. District Court in Central Islip, N.Y., not far from his Brentwood home, where he was arrested earlier in the day, Zea answered “yes” when Magistrate Judge Arlene Lindsay asked if he understood the charges contained in the five-count indictment.

No bail offer was made, and Lindsay noted that “the evidence strongly suggests the defendant poses a danger to the community and given his previous actions, a risk of flight.”

Prosecutors charged that Zea planned to join al-Qaida outside the United States that would result in murder.

The United States also charged Zea, who appeared in court wearing a brown shirt and brown pants, his hair pulled back in a ponytail, with attempting to give money to al-Qaida affiliates.

Zea tried to destroy his computers when he learned he was under investigation, prosecutors said. But investigators were able retrieve documents including issues of al-Qaida’s “Inspire” magazine from his hard drives. They also recovered a semi-automatic rifle that Zea had given to an acquaintance before his planned trip to Yemen, prosecutors said.

Al-Qaida in the Arabian Peninsula has claimed responsibility for the attempt by a Nigerian man on Christmas Day 2009 to take down a Detroit-bound airliner with a bomb concealed in his underwear.

After the hearing, Zea’s parents denied that he had any role in a terror plot.

“This is all lies. All fake. I raised my son, I know who he is,” said his mother, Sandra Zea.

Marcos Zea’s parents said they had raised him as a Roman Catholic but that about three years ago he began attending a mosque in their hometown of Brentwood, N.Y., about 50 miles east of Manhattan.

Alvaro Zea, said his son told him he had converted to Islam last year, after he was returned to the U.S. after flying to London.

“I said ‘Why? Why are you telling me this?’ And he said, ‘I like the religion, and religion is free,’” the elder Zea told reporters after the hearing.

The parents said they asked their son to stop attending the mosque in 2012, claiming their entire family was being watched by the FBI.

Zea faces five criminal counts that include conspiracy to commit murder in a foreign country, two counts of trying to provide support to terrorists or terrorist organizations, and two counts of obstruction.

“Despite being born and raised in the United States, Zea allegedly betrayed his country and attempted to travel to Yemen in order to join a terrorist organization,” said Loretta Lynch, U.S. Attorney for the Eastern District of New York.

Federal prosecutors said that in January 2012, Zea attempted to fly from New York to Yemen, but was intercepted by British customs officials while changing planes and returned to the United States. Having been foiled in his attempt to reach Yemen, he then helped an 18-year-old associate, Justin Kaliebe, attempt a similar trip in January 2013.

Kaliebe was arrested while trying to board a flight to Oman and charged with trying to provide support to terrorists, according to court papers.

A law enforcement official familiar with the case said investigators had “no indications” that Zea or Kaliebe were actively recruited by al-Qaida operatives. The official said investigators believed the two had been indoctrinated by al-Qaida messaging and propaganda disseminated over the Internet.

The official also said that while there is no reason to believe the two men are part of a larger militant network, the fact they apparently teamed up “demonstrates that oftentimes individuals sharing a warped ideology find support and encouragement from one another.”

The law enforcement official said the prosecutions of Zea and Kaliebe grew out of a joint investigation by federal and local authorities. An officer from the Intelligence Division of the New York Police Department developed a relationship with Zea and learned through statements by Zea and his associates that Zea was going to be traveling overseas in January 2012 to join the Ansar al Sharia militant group.