A startling portrait is emerging of a New Jersey man suspected of travelling to Yemen to train with Al Qaeda — and the potential warning signs that were missed before he allegedly opened fire at a hospital there.

The U.S. government knew about Sharif Mobley, a 26-year-old U.S. citizen, even before Yemeni officials arrested him, the Associated Press reported, citing a law enforcement official who spoke on condition of anonymity to discuss an ongoing investigation.

The official did not provide a time frame or details about what exactly was known about him.

Another law enforcement official told the Associated Press that Mobley had traveled to Yemen with the goal of joining a terrorist group.

He was arrested this month in Yemen as part of a security sweep of Al Qaeda suspects and was taken to a hospital over the weekend after he complained of feeling ill. Yemeni officials said he snatched a gun from a security guard and fatally shot one guard and wounded another before being captured.

Anas Muhaimin, a Philadelphia imam, said he tried to discourage Mobley from traveling to Yemen when Mobley asked him about studying Arabic abroad around 2007. Muhaimin says he told Mobley not to go to Yemen because he believed the country was unsafe.

Muhaimin's brother Anwar is also an imam at Masjid Quba in Philadelphia. He said Friday that Mobley was a "happy-go-lucky kid" who attended weekend Arabic programs at the mosque in the 1990s.

The imams say Mobley attended prayer services occasionally as a young adult, but hasn't been to the mosque in about three years.

Authorities also are looking into Mobley's work at six U.S. nuclear power plants — and whether he had access to sensitive information or materials that would be useful to terrorists.

Mobley worked for contractors at plants in New Jersey, Pennsylvania and Maryland from 2002 to 2008, mostly hauling materials and setting up scaffolding, plant officials said.

Nuclear Regulatory Commission spokesman Neil Sheehan said Friday that investigations are under way into which areas Mobley entered. But he noted that areas containing nuclear fuel are tightly controlled, and that a laborer typically would not have access to security information or other sensitive matters.

The plants are also checking areas where Mobley worked to ensure everything is in order, said NRC spokeswoman Diane Screnci.

Mobley, a U.S. citizen of Somali descent, has not been linked to any wrongdoing at any of the plants. And officials said nothing he did when he worked there aroused any suspicion.