The man accused of attacking a Canadian Forces recruitment centre in Toronto once worked for several months at Pearson International Airport and had access to restricted areas.

Ayanle Hassan Ali, a 27-year-old born in Montreal who has lived in Toronto from the age of two, faces nine criminal charges including three counts of attempted murder following Monday's attack, which sent two members of the military to hospital with minor injuries.

Toronto police, who are investigating along with other police forces, are considering the possibility that the attack was an act of terrorism. Ali allegedly said, "Allah told me to do this, Allah told me to come here and kill people," during the rampage, which ended when he was taken down by a group of soldiers.

A Greater Toronto Airport Authority spokesperson confirmed on Wednesday that Ali worked at the airport on behalf of a third-party tenant and had a restricted area identification card from December 2008 to March 2009.

The airport authority didn't say what company Ali worked for or in what capacity.

"As this is an ongoing investigation by the Toronto Police Services, any further questions relating to this case should be directed to Toronto Police Services' communications department," the airport authority's Siobhan Desroches said in an email.

Pearson is Canada's busiest airport, with some 39 million passengers travelling through it every year. Some 40,000 people work there, according to the airport authority website.

Little is known about Ali's past, but those who knew him described him as a nice guy who kept to himself. He prayed two or three times a week at a mosque in Rexdale, a northwest Toronto neighbourhood, near the townhouse he shared with his mother and younger sister.

Sources in the Somali community told CBC News that Ali studied at the University of Calgary, but returned to Toronto before getting a degree — the university says Ali registered in open studies classes and was never admitted to a specific program. 

When he did, the sources said, his mental health deteriorated and he became increasingly isolated. 

Ali is set to make a second court appearance in Toronto on Friday.