Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A van plowed into pedestrians on a sidewalk at a busy intersection in Toronto on Monday afternoon, killing 10 people and injuring 15 others, police said. Authorities said terrorism wasn't suspected.

The driver was taken into custody, Toronto Police Chief Mark Saunders said Monday night.

Police identified the suspect as as Alek Minassian, 25, of Richmond Hill, a town north of Toronto. Saunders initially gave the suspect's first name as Alex, but police corrected it shortly thereafter.

Mental illness is the leading theory for a motive, several U.S. and Canadian law enforcement officials briefed on the investigation told NBC News. And while it appeared that the suspect acted deliberately, terrorism doesn't seem to have been his motive, U.S. law enforcement officials said.

The suspect had been involved in an online discussion about Elliot Rodger, the man accused of carrying out a 2014 shooting rampage near Santa Barbara, California, that killed six people, the law enforcement officials said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Canadian Public Safety Minister Ralph Goodale, who was already in Toronto for a meeting of G-7 security ministers, told reporters that after consulting with security and police agencies, he also believed that the attack wasn't a terrorist incident.

Grateful for the brave and professional response of @TorontoPolice and other first responders to the horrific attack at Yonge and Finch. Canadians are appalled at what happened. The victims and their families have our deepest condolences. — Ralph Goodale (@RalphGoodale) April 23, 2018

"On the basis of all available information at the present time, there would appear to be no national security connection," he told reporters Monday night.

Saunders agreed that while he couldn't rule out anything so early in the investigation, terrorism didn't appear to have been involved.

"Yes, the city is safe," he said, adding, however, that investigators would be at work for a long time.

"This is not over," Saunders said. "We are far away from being over."

Graphic images from the scene showed at least two bodies on the ground near what appeared to be blood.

One witness, Diego DeMatos, said he saw several pedestrians on the ground, surrounded by crowds of "screaming and crying" people.

"The driver was swerving back and forth between the sidewalk and the road," said DeMatos, 23. "I saw where the van hit two people and then kept going."

Another witness, Phil Zullo, told the Canadian Press that he saw police arresting a man who had been driving a Ryder rental truck and that he witnessed people "strewn all over the road."

The van used to kill 10 pedestrians in Toronto on Monday. Cole Burston / Getty Images

"I must have seen about five, six people being resuscitated by bystanders and by ambulance drivers," Zullo told the news agency. "It was awful. Brutal."

Prime Minister Justin Trudeau said in Ottawa: "Our hearts go out to anyone affected."

In a statement late Monday, the White House pledged any support Canada might need. "The United States stands with the Canadian people in the aftermath of today’s tragic event in Toronto," the statement said. "Our thoughts and prayers go out to the families of those affected, and we wish a full recovery to those injured."