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
- Romney, Huntsman may both be taking...
- NFL says Husain Abdullah should not have been...
- Why we don't need to worry that Utah cities...
- Luck, instinct determined fates of volcano...
- Colorado high court considers pot firing case
- Obama goal of Gitmo closure stalled at Pentagon
- Officials confirm first Ebola case diagnosed...
- Olympian Michael Phelps arrested on DUI charge
- Romney, Huntsman may both be taking... 39
- Republicans rallying behind religious... 32
- Obama: US 'underestimated' Islamic... 24
- New mom Chelsea Clinton celebrates baby... 14
- Police: Fired worker beheaded Oklahoma... 13
- Marijuana could deliver more than $800... 12
- Tens of thousands of immigrant families... 11
- Parents of Michael Brown unmoved by... 7