US government officials have said the army psychiatrist suspected of killing 13 people and injuring 38 others in Texas is to be charged in a military court.
Major Nidal Malik Hasan went on a shooting spree at the Fort Hood Army Base on Thursday, before being shot at by civilian police.
Hasan, who was in coma, has regained consciousness and has been talking to his lawyer.
US officials have said that intelligence agencies first started investigating Hasan in December of last year, reviewing what they believe to be email communications between him and a Muslim cleric in Yemen who is known for his anti-American teachings.
Anwar al-Awlaki served as an imam at a mosque outside of Washington DC where Hasan worshipped until 2002.
Federal officals ended the investigation after concluding that Hasan's communications were related to research he needed to work as a psychiatrist at the Walter Reed Medical Centre.
However, in a blog posting on Monday al-Awlaki wrote: "Nidal Hasan is a hero. He is a man of conscience who could not bear living the contradiction of being a Muslim and serving in an army that is fighting against his own people.
"In fact the only way a Muslim could Islamically justify serving as a soldier in the US army is if his intention is to follow the footsteps of men like Nidal."
Investigators are trying to establish the motive for the shootings. Hasan was known to be against the wars in Iraq and Afghanistan in which the US is involved.
He was supposed to be deployed to Afghanistan this month but his family said he was trying to get out of the assignment.
Hasan's family attended the Dar al-Hijrah Islamic Centre in Falls Church, Virginia, where al-Awlaki was preaching in 2001.
The funeral of Hasan's mother was held at the mosque on May 31, 2001, according to her obituary.
That was around the same time two 9/11 hijackers worshipped at the mosque.
Al-Awlaki left the US in 2002, eventually travelling to Yemen but his whereabouts remain unknown since he was released from a Yemeni jail last year.
He is on Yemen's most-wanted list of "militants", according to three Yemeni security officials.
Barack Obama, the US president, travelled to Fort Hood on Tuesday to attend a memorial service for those killed in the attack, after which he will meet the bereaved families in private.
Kevin Sullivan, who worked for former president George Bush as communications director, said Obama's presence alone will be meaningful to those hurting at the US's largest military installation.
"It sends a message that he understands this is a national moment," Sullivan said.
"But what really matters is that the president is able to provide some comfort to the sons and daughters and husbands and wives of the victims.
"That's ultimately why he's going. He's saying, 'The whole country grieves for you."'
The memorial service will be open to the public and about 3,000 people are expected to attend.
They include the families of the 13 victims, as well as some of those wounded and their families, said Lietenant-General Robert Cone, the post commander.