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

An "appalled" Minnesota Gov. Mark Dayton said Thursday that police wouldn't have shot and killed Philando Castile if he'd been white and called for justice "with the greatest sense of time urgency."

Castile, who was about to turn 33, was killed Wednesday during a traffic stop in Falcon Heights, a suburb of the Twin Cities. He died at a hospital after the incident, which occurred about 9 p.m. (10 p.m. ET) Wednesday.

The Hennepin County medical examiner's office said in an autopsy report late Thursday that Castile, 32, died of multiple gunshot wounds. It classified his death as a homicide.

Castile's fiancée, Diamond Reynolds, recorded the aftermath of the incident on live video. She said Castile was shot five times as he sat at the steering wheel reaching into his back pocket for his ID.

Reynolds and her daughter, who was in the back seat, weren't hurt.

Related: Philando Castile Shooting in Falcon Heights, Minnesota, Sparks Protests

Dayton said Castile would be alive if he hadn't been black, adding that the shooting demonstrated a troubling pattern of racism among some Minnesota law enforcement officers.

"Would this have happened if those passengers, the driver were white?" he asked. "I don't think it would have."

Dayton said he has spoken with Minnesota's senators, Amy Klobuchar and Al Franken, and the area's House representatives and would be demanding a Justice Department investigation.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"I can't say how shocked I am and deeply, deeply offended that this would happen to somebody in Minnesota," Dayton said grimly. "No one should be shot in Minnesota for a taillight being out of function. No one should be killed in Minnesota while seated in their car."

The Justice Department is already investigating the Louisiana shooting, and it said Thursday that it was assessing the Minnesota incident.

The St. Anthony Police Department, which covers Falcon Heights, a community of 5,300 people, identified the officer who shot Castile as Jeronimo Yanez, a four-year veteran. He and his partner, Joseph Kauser, also a four-year veteran, were placed on administrative leave, as is standard in such investigations.

Castile had no felony or violent criminal record, but he did have an extensive history of traffic violations, according to extensive interviews and reviews of court records by NBC News.

He had been pulled over and charged at least 31 previous times in Minnesota for traffic-related misdemeanors — from driving without a muffler and without insurance to driving without a license and speeding, according to the data.

"It's incredibly disturbing. I'm upset as a U.S. citizen," Mitchell Swaden, a retired public defender who represented Castile in a 2011 traffic case, told NBC News.

Upon arriving in Warsaw, Poland, for a NATO summit, a somber President Barack Obama made a middle-of-the-night statement putting the shooting in the context of a similar incident Tuesday, when Alton Sterling was killed by police in Baton Rouge, La.

"These are not isolated incidents," Obama said. "They are symptomatic of a broader set of racial inequalities that exist in our criminal justice system."

Obama said he couldn't comment on the specifics of the shootings, but he made an impassioned plea for all Americans to recognize that "a big chunk of our citizenry feels that because of the color of their skin that they are not being treated the same."

Obama disputed the notion that the explosive issue of police violence was solely a racial matter, calling it "an American issue that we should all care about" and adding: "All fair-minded people should be concerned."

And he specifically urged that Americans not equate protests with opposition to law enforcement.

"There is no contradiction between us supporting law enforcement ... and also saying that there are problems across our criminal justice system," he said.

"There are biases — some conscious, some unconscious — that have to be rooted out. That's not an attack on law enforcement. That's reflective of the values the vast majority of law enforcement brings to the job."

Castile was a cafeteria supervisor at J.J. Hill Montessori School in St. Paul. Reynolds, his fiancée, described him as a "very, very sweet man" who wasn't involved with street gangs and wanted only to take care of his family.

Donn O'Malley, chairman of the school's Parent Teacher Organization, which convened a vigil for Castile on Thursday night, called him a "cherished" member of the community.

Philando Castile is mourned Thursday at a vigil at J.J. Hill Montessori School in St. Paul, Minn. NBC News

"We entrusted our children to him during the school day, and our children loved him," O'Malley told NBC News. "When I saw the news this morning and told my children about it, they were sad, confused and immediately started sharing with me how great Phil was."

The shooting immediately created outrage. Crowds shouting "no justice, no peace" have remained outside the governor's mansion in protest.

"It's impossible to see that video and not be shocked and disturbed, but unfortunately, I have seen this horrific scene too many times to be thoroughly shocked," said Rep. Keith Ellison, D-Minn.

"Sadly, it's almost routine — African-American man, unarmed or lawfully armed, complying with the police, shot down, killed," Ellison told NBC News.

"If the shooter was not a police officer, there would clearly be charges, right?" he said. "Without a doubt."