NEW YORK (AP) — The undercover investigator credited with helping stop two would-be terrorists had sought to begin his New York Police Department career like nearly everyone else — as a rookie patrolman.

But when police officials learned he spoke Arabic and noticed his calm demeanor, they soon had other plans for him.

The recruit agreed to skip the police academy and enter a little-known NYPD counterterrorism program that grooms and deploys young undercover officers to uncover potential plots — a job one likened to being a human surveillance camera.

Authorities hailed the undercover officer's work following the arrest Saturday of terror suspects Mohamed Mahmood Alessa and Carlos Eduardo Almonte as they prepared to fly from New York to Egypt and then to Somalia. The New Jersey men appeared briefly in federal court in Newark on Monday on charges they conspired to kill, maim and kidnap persons outside the United States by joining the Somali terror group al-Shabab.

Alessa, 20, and Almonte, 24, had no contact with Somali terrorists and had no specific terror plot, according to officials and court documents.

The undercover officer — while posing as a devout Muslim and circulating among other men with radical leanings in the New York City area — met the suspects in 2009 and won their trust, authorities said. He got close enough to them to secretly record their radical rants about fighting a holy war here and abroad.

"I leave this time. God willing, I never come back," authorities say Alessa told the officer last year. "Only way I would come back here is if I was in the land of jihad and the leader ordered me to come back here and do something here. Ah, I love that."

Police officials have said the undercover officer is in his 20s, is of Egyptian descent and joined the department about five years ago. He wore a beard and had a home in Jersey City, N.J., where he practiced hand-to-hand fighting tactics with the defendants, according to the criminal complaint against Alessa and Almonte.

But the personal information about him ends there.

"As in gun trafficking and narcotics investigations, the NYPD cannot acknowledge publicly individual undercover police officers who have infiltrated suspects," Police Commissioner Raymond Kelly said.

A senior U.S. counterterrorism official, speaking on condition of anonymity to discuss the ongoing investigation, said Monday the yearlong undercover operation by the officer gave investigators a firsthand glimpse at the radicalization process of would-be terrorists.

The undercover officer is a product of a campaign by the nation's largest police department to fight terrorism since the Sept. 11, 2001, attacks. The NYPD has assigned more than 1,000 officers to counterterrorism duty, including a cadre of undercovers on assignments so secret that sometimes even loved ones don't know they're police officers.

Capitalizing on the country's most ethnically diverse crop of recruits, officials screen applications and single out candidates "suited for deep undercover assignments," NYPD spokesman Paul Browne said.

For counterterrorism work, the NYPD typically looks for young men with Muslim or Arab backgrounds, and who speak foreign languages. The undercover officers also must be tough enough to deal with the stresses of living a double life.

If the recruits accept the assignment, they are diverted from the academy and — to protect their identities — into a separate training program run by the NYPD's Intelligence Unit. They are given a cover name and cover story, and are assigned to follow leads about potential terror threats in or around the city.

The NYPD refuses to say how many of the undercover officers have been deployed or describe their tactics. But the 2006 trial of Shahawar Matin Siraj — convicted of plotting to blow up the Herald Square subway station in Manhattan — gave rare glimpses into how the department investigates Islamic extremists.

A 23-year-old undercover detective using his alias, Kamil Pasha, testified that he was drafted once the NYPD learned he was born in Bangladesh and could speak Arabic and Urdu. He said training lasted only a few weeks in 2002 before he got an apartment in Brooklyn and began attending a mosque there as a "walking camera" for his police handlers.

"I was told to act like a civilian — hang out in the neighborhood, gather information," he testified.

The witness recounted how he met Siraj at an Islamic bookstore near the mosque. He claimed that the defendant advocated jihad against the United States for its support of Israel and argued that targeting both countries for suicide bombings was justified.

Siraj declared in December 2002 that, "The mission was not complete on 9/11 because it did not hit Wall Street," the witness said.

Pressed on cross-examination about his own beliefs, the undercover officer expressed dismay at Siraj's brand of Islam.

"Where in Islam does it say you can blow up a train station?" he said.


Associated Press writers David Porter and Samantha Henry in Newark, N.J., and Matt Apuzzo and Eileen Sullivan in Washington contributed to this report.