VANCOUVER, British Columbia: The gunman who shot and killed a soldier in plain daylight then stormed Canada’s Parliament once complained that a Vancouver mosque he attended was too liberal and inclusive, and was kicked out after he repeatedly spent the night there even though officials told him to stop, Muslim leaders said Friday.

Aasim Rashid, spokesman for the British Columbia Muslim Association, said Michael Zehaf-Bibeau visited the Masjid Al-Salaam mosque for three to four months toward the end of 2011, and possibly early 2012, before he was told not to come back.

Rashid said that before Zehaf-Bibeau got in trouble for using the mosque for accommodations, he had complained to leaders in the previous administration about the mosque’s openness and willingness to let non-Muslims visit.

“The mosque administration sat him down and explained to him that this is how they run the mosque and that they will keep the doors open to all Muslims and non-Muslims who want to visit,” he said at a news conference held at the mosque Friday.

Rashid said that Zehaf-Bibeau was told he should go pray at a different mosque if he disagreed. However, he stayed until he was ultimately asked to leave when officials learned he was still sleeping in the mosque while battling legal troubles.

After the second or third time, he was told to leave the premises and “not to come back,” Rashid said.

“This was the last interaction that the people of the mosque here have had with him,” he said.

Zehaf-Bibeau, 32, shot a soldier to death at Canada’s national war memorial Wednesday, and was eventually gunned down inside Parliament by the sergeant-at-arms.

His motive remains unknown, but Prime Minister Stephen Harper has called the shooting a terror attack, and the bloodshed raised fears that Canada is suffering reprisals for joining the US-led air campaign against Islamic State extremists in Iraq and Syria

The Royal Canadian Mounted Police released two photos of Zehaf-Bibeau on Friday evening in an effort to illicit information from the public. One is of the car he used in the attack and the other is mug shot taken by Vancouver police. Police say they are particularly interested in information from his time in Ottawa from Oct. 2.

The attack in Ottawa came two days after a man described as an “ISIL-inspired terrorist” ran over two soldiers in a parking lot in Quebec, killing one and injuring the other before being shot to death by police. The man had been under surveillance by Canadian authorities, who feared he had jihadist ambitions and seized his passport when he tried to travel to Turkey.

Rashid said the Muslim association has been working on a preventive program that focuses on minimizing the effect of terrorist and criminal propaganda in Canada. He decried the recent violence.

“These are acts of criminal violence and show utter disregard for human life and the laws of the world as well as its religions,” he said. “We openly denounce the propaganda of the lawless groups trying to incite Canadians to hurt other Canadians.”

In July, another man who attended the Masjid Al-Salaam mosque, 25-year-old Hasibullah Yusufzai, was charged under a new anti-terrorism law for allegedly leaving the country to join Islamist fighters in Syria. Yusufzai is believed to have left Canada in January.

Rashid said Yusufzai attended the mosque two or three years ago.

“We do know that at some point he was asked to leave this mosque because of certain views he was expressing,” he said.

While he was living in Vancouver in 2011, Zehaf-Bibeau was arrested on a robbery charge. During a court-ordered psychological evaluation, he said he committed the crime for the sole purpose of getting incarcerated. An evaluation said Zehaf-Bibeau believed jail was the only way to overcome a crack addiction and that as a devoted Muslim, he thought prison time was a way to pay for his mistakes.

Unlike the attacker in the Quebec case, Zehaf-Bibeau was not being watched by authorities. But a top police official said Zehaf-Bibeau — whose father was from Libya — may have lashed out in frustration over delays in getting his passport.

Bob Paulson, commissioner of the Royal Canadian Mounted Police, said the police commissioner said Zehaf-Bibeau’s e-mail was found on the hard drive of someone charged with a terrorist-related offense. He didn’t say who and described the connection as tenuous.

Zehaf-Bibeau’s passport had not been revoked or his application rejected, but authorities were still investigating whether to grant him one, Paulson said. The wait appeared to weigh heavily on Zehalf-Bibeau.

Abubakir Abdelkareem, who often visited the Ottawa Mission, a homeless shelter downtown where Zehaf-Bibeau stayed in recent weeks, said Zehaf-Bibeau told him he had had a drug problem but had been clean for three months and was trying to steer clear of temptation by going to Libya.

But in the days before the attack, Abdelkareem said Zehaf-Bibeau stopped being talkative and sociable and slept during the day. Abdelkareem concluded Zehaf-Bibeau was back on drugs.

In an e-mail to the AP expressing horror and sadness at what happened, Zehaf-Bibeau’s mother, Susan Bibeau, said that her son seemed lost and “did not fit in,” and that she hadn’t seen him for more than five years until having lunch with him last week.

___

Associated Press writers Rob Gillies in Toronto and Jennifer Peltz in Ottawa contributed to this story.