WASHINGTON — After days of angry protests and mounting public pressure, President Obama summoned five of his closest advisers to the Oval Office on Thursday evening. It was time, he told them, for him to speak to the nation about the Trayvon Martin verdict, and he had a pretty good idea what he wanted to say.

For the next 15 minutes, according to a senior aide, Mr. Obama spoke without interruption, laying out his message of why the not-guilty ruling had caused such pain among African-Americans, particularly young black men accustomed to arousing the kind of suspicion that led to the shooting death of Mr. Martin in a gated Florida neighborhood.

On Friday, reading an unusually personal, handwritten statement, Mr. Obama summed up his views with a single line: “Trayvon Martin could have been me 35 years ago.”

That moment punctuated a turbulent week marked by dozens of phone calls to the White House from black leaders, angry protests that lit up the Internet and streets from Baltimore to Los Angeles, and anguished soul-searching by Mr. Obama. Aides say the president closely monitored the public reaction and talked repeatedly about the case with friends and family.