A man was arrested for "terrorism-related offenses" at Toronto's international airport just before he was about to board an airplane bound for North Africa, Canadian police said on Wednesday.

The Royal Canadian Mounted Police (RCMP) said 25-year-old Canadian citizen Mohamed Hassan Hersi was headed to Somalia to join al Shabaab, which police said is a hard-line Islamist group that has ties to al Qaeda.

"Al Shabaab is a listed terrorist entity," said RCMP Inspector Keith Finn at a press conference. "Any participation in that group would constitute an offense."

Hersi was arrested Tuesday evening at Toronto's Pearson International Airport, moments before he was to board a one-way flight to Cairo via London, the RCMP said. They said Hersi planned to travel to Somalia from Cairo.

Somalia has replaced Iraq as the state most at risk from terrorist attack, according to a ranking by global analysts Maplecroft.

Hersi appeared in a Toronto area courthouse on Wednesday, and was remanded to custody until Friday.

He has been charged by police under section 83.8 of the Criminal Code for attempting to participate in terrorist activity and for providing counsel to a person to participate in terrorist activity.

The RCMP said that they, along with Toronto police, have been investigating Hersi since October 2010. Finn would not comment on additional suspects or charges.

"There was nothing in the investigation that would suggest direct threat to Canadians within Canada," Finn said.

"The issue of radicalization, and of people from Canada traveling overseas and receiving that type of indoctrination and training, remains a concern to the RCMP."