President Obama, who has struggled to find his footing in politically charged matters of race, seems to have found an answer: Eric H. Holder Jr.

The nation’s first African American attorney general has become the voice of the president on controversial racial issues, reaching out to black communities, pushing an aggressive civil rights agenda and stepping in when Obama cannot, or should not. That dynamic was fully apparent this week, when Holder’s Justice Department launched an investigation into the case of Trayvon Martin, the 17-year-old black youth fatally shot in Sanford, Fla., last month.

As national protests over the case spread Thursday, the Sanford police chief stepped down temporarily in the face of sharp criticism. In Florida, Justice Department officials met with Martin’s parents. And the case is certain to come up Friday when Holder talks with a group of black ministers at a previously scheduled meeting at the White House.

In an administration headed by the first African American president and weighted with expectations of racial progress, much has rested on Holder, as White House aides have emphasized Obama’s need to stay out of legal and local issues.

Again this week, Holder’s department has provided the White House cover with civil rights advocates, who began asking for federal intervention soon after Martin was fatally shot in a confrontation with neighborhood watch volunteer George Zimmerman.

“On policy issues and issues that involve race, Eric Holder is now, during this campaign context, the official black guy of the Obama administration,” said the Rev. Eugene F. Rivers III, senior policy adviser to the Church of God in Christ, one of the largest black denominations in the country. “Because the president cannot in any way, directly or indirectly, be associated with anything that whispers race, and for perfectly logical reasons.”

Justice officials said they ordered an investigation in the Martin case solely for law enforcement reasons.

NAACP President Benjamin Jealous said he is satisfied with Holder’s role and the administration’s response, although he would like to hear from Obama directly.

“President Obama has spoken through his Department of Justice on this case. They are doing more than any other Department of Justice in recent memory when it comes to taking on cases like this,” Jealous said. “Still, it’d be very appropriate for our president — any president — to speak out about the need for our nation to finally deal with the issue of racial profiling.”

Zimmerman, who is Hispanic, had called 911 to report a suspicious person in the gated community north of Orlando. He told police that he shot Martin in self-defense.

Martin’s case is the sort of emotional racial issue that has tripped up President Obama, who has sought a careful balance between fulfilling the grand hopes associated with his vaunted status in American race history with his practical political need to attract and keep support from skeptical working-class white voters.

If he appears disinterested, he risks upsetting his most loyal constituency. But, as this president has learned the hard way, when he steps into matters of race, he instantly alters the news cycle and siphons headlines from his preferred themes of the day.

As Martin’s shooting became a national issue this week, sparking street protests and candlelight vigils from New York to Milwaukee, the official White House response has been relative silence.

“Our thoughts and prayers go out to Trayvon Martin’s family, but obviously we’re not going to wade into a local law enforcement matter,” White House Press Secretary Jay Carney said earlier this week. “I don’t have any conversations to report to you.”

Obama has learned the perils of speaking frankly about race. At a news conference in summer 2009, he said police had acted stupidly in arresting his friend, Harvard scholar Henry Louis Gates Jr., who is black, and then had to retract the statement. He later invited both the police officer and Gates to the White House for a beer.

The president has not weighed into another local issue since, speaking instead of race primarily in terms of the nation’s history and progress rather than current events.

The Martin case presents a complex political calculation for the White House. It is unfolding in a crucial election battleground state and one where the president is heavily courting support from blacks and Hispanics — the two ethnic groups at the heart of the controversy.

Obama’s campaign is seeking to mobilize black voters, many of whom may see the Martin case as a test of the president’s commitment to his fellow African Americans, a commitment that has been questioned by some in that community. But central Florida is home to a large Hispanic population that has been a key swing voting bloc and one that Obama strategists see as crucial to his reelection.

“When the incident happened in Boston, he took personal interest in what happened to a professor, and we’d like for him to do the same thing here in central Florida, because it was a little kid who was killed and now has stirred up a huge volcano that’s spewing lava,” said state Sen. Gary Siplin, an Orlando Democrat and a former chairman of the legislative black caucus.

During his tenure at the Justice Department, Holder has also emphasized terror prosecutions, financial fraud and other issues, but he has drawn recent headlines for his focus on civil rights. That includes challenges to several states over rough immigration laws and voting changes, which the department has said would discriminate against minorities.

During the first three years of this administration, the department prosecuted 35 percent more hate crime than the first three years of the previous administrations, a department spokeswoman said.

In a civil rights case in the news this week, Thomas E. Perez, assistant attorney general for civil rights, announced Thursday that the federal government’s case against three Brandon, Miss., teenagers had led to guilty pleas to federal hate crimes.

The teens had attacked and killed James Craig Anderson, 47, after saying they wanted to find and attack African Americans.

“This is a case about a group of racist thugs who made a sport of targeting vulnerable African Americans,” Perez said.

Perez said that the case, which carries a maximum sentence of life in prison, is the first involving a death that was prosecuted under the Matthew Shepard and James Byrd Jr. Hate Crimes Prevention Act of 2009.

It is the same law that justice officials are considering in the case of Trayvon Martin.

Staff writer Peter Wallston contributed to this report.