Obama cautioned before speaking that he must "be careful so we're not impairing any investigation." But he said he was glad the Justice Department was investigating and that Florida officials had formed the task force.
"I think all of us have to do some soul searching to figure out how did something like this happen, and that means we examine the laws and the context for what happened as well as the specifics of the incident," Obama said.
White House spokesman Jay Carney said later that the president "had thought about" the case and "was prepared to answer that question when he got it."
Martin's parents, Tracy Martin and Sybrina Fulton, thanked Obama for his support, saying in a statement the president's words "touched us deeply and made us wonder: If his son looked like Trayvon and wore a hoodie, would he be suspicious, too?"
NAACP President Benjamin Jealous said in an interview that Obama "spoke from the heart of a parent and the experience of a parent of color, but also from the pulpit of our national leader. And we needed to hear all of those things in this moment."
Obama, early in his term, also spoke out after the arrest of Henry Louis Gates Jr., a black Harvard University professor, by a white police sergeant in Cambridge, Mass.
Gates was arrested in his home after the police sergeant arrived to investigate a possible burglary. The charges were dropped, but Obama said the police had "acted stupidly." The president said later he should have expressed his concerns with different language and invited both Gates and Sgt. James Crowley to the White House for a chat and a beer.
The Justice Department and FBI have opened a civil rights investigation into Martin's death, and a grand jury is considering whether to charge Zimmerman. Martin's parents, civil rights activists and others who have reacted to the case say they won't be satisfied until Zimmerman is arrested.
Martin was returning from a trip to a convenience store when Zimmerman started following him, telling police dispatchers Martin looked suspicious. At some point, the two got into a fight, and Zimmerman pulled out his gun.
Zimmerman told police Martin attacked him after he had given up on chasing the teenager and was returning to his sport utility vehicle.
Police Chief Bill Lee stepped down temporarily this week to try to cool the building anger that his department had not arrested Zimmerman. Hours later, Gov. Rick Scott announced that the local state attorney, Norman Wolfinger, had recused himself from the case in hopes of "toning down the rhetoric" surrounding it.
Associated Press writers Kasie Hunt in New Orleans, Jim Kuhnhenn in West Monroe, La., David Fischer in Miami and Darlene Superville in Washington contributed to this report.
Follow Ken Thomas on Twitter: http://www.twitter.com/AP_Ken_Thomas
- Allow student loan bankruptcies, but hold...
- Police, protesters collide again in Ferguson
- Texas Gov. Perry assembles high-powered legal...
- Colleges add luxury touches to new football...
- Another American hostage at risk by Islamic...
- Car crash in Argentina kills 3 relatives of pope
- 'Don't know' if Missouri teen shot with hands up
- Want to increase attraction in your...
- Texas Gov. Perry says indictment is... 22
- 'Don't know' if Missouri teen shot with... 22
- Obama heading back to DC in rare... 20
- Police, protesters collide again in... 20
- Texas' Perry indicted for coercion for... 19
- Texas Gov. Perry assembles high-powered... 17
- Police identify Missouri officer who... 16
- Emerging solar plants scorch birds in... 14