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
- 31 things you might not know about the Harry...
- Which U.S. cities are the best for upward...
- The one thing you may be giving your children...
- Alleged sexual abuser on the run for 17 years...
- Back to Beijing for 2nd Olympics in 14 years
- Man describes find that could solve MH370...
- Sex and violence harm rather than help...
- Religious groups react to Boy Scouts’...
- LDS Church 're-evaluating' Scouting... 109
- Religious groups react to Boy... 79
- Boy Scout board approves end to blanket... 71
- Are lawsuits ahead for church-based Boy... 31
- Oklahoma Supreme Court: Ten... 27
- 2016 Republicans use Trump, TV to make... 26
- Obama: Republican criticism of Iran... 25
- Covered California: Cost of health care... 17