Eric Holder, who made history as the first African American to lead the Justice Department, announced his resignation as attorney general Thursday. President Obama praised Holder, thanking him for his service and dedication to justice for all Americans. (AP)

Eric Holder, who made history as the first African American to lead the Justice Department, announced his resignation as attorney general Thursday. President Obama praised Holder, thanking him for his service and dedication to justice for all Americans. (AP)

It was Super Bowl halftime when Eric H. Holder Jr. buttonholed President Obama at a White House viewing party in 2011. But the attorney general didn’t want to talk about the game; he wanted to talk shop.

Holder informed his boss that he was prepared to recommend that the administration no longer defend a federal law defining marriage as between a man and woman because it was unconstitutional. Obama replied that he had reached the same conclusion.

Justice Department colleagues who heard Holder describe the conversation said the moment illustrates the impact of the special relationship that the nation’s top law-enforcement officer enjoyed with the commander in chief.

Unlike most Cabinet members, Holder developed a close personal friendship with Obama that allowed him to slip comfortably between casual, informal “Barack and Eric” interactions and official business, while achieving, at times, something of a mind meld with the president.

“Our relationship goes beyond him being the president and me being the attorney general,” Holder told The Washington Post on Friday, a day after announcing plans to step down from his post after six years in office. “He and I are friends. We have discussed these issues, and we share a worldview.”

Attorney General Eric Holder is resigning from his post as the longest-serving member of President Obama’s Cabinet. From the “Fast and Furious” scandal, to collecting reporters’ phone records, to the Defense of Marriage Act, here’s a look at Holder’s comments on some of the biggest controversies during his nearly six-year tenure at the Department of Justice. (Jackie Kucinich, Julie Percha/The Washington Post)

During an emotional ceremony at the White House on Thursday, Holder teared up as Obama thanked him for his service and praised his civil rights record. The two men embraced, with the nation’s first African American president patting the first black attorney general on the back several times.

“We have been great colleagues, but the bonds between us are much deeper than that,” Holder said, taking the lectern after Obama’s remarks and addressing him directly. “In good times and in bad, in things personal and in things professional, you have been there for me.”

No matter whom Obama chooses to replace Holder, the next attorney general will not be able to reprise the unique role Holder played in the Obama Cabinet; he was one of the few in Washington who had gained enough of the president’s confidence to be welcomed into Obama’s Chicago-based inner circle. Since meeting in 2004 at an event for then-Sen. Obama, where the two chatted about basketball, their relationship evolved slowly into a genuine friendship — that also paid professional dividends for both.

Administration aides came to refer to Holder, who was pilloried by Republicans for a botched anti-weapon-smuggling investigation and later held in contempt by the House of Representatives, as Obama’s “heat shield” — a proxy for the president to absorb criticism from his political rivals.

Obama reportedly spurned the advice of some of his early political advisers in the White House to get rid of Holder. Instead, the attorney general is one of just three members of the president’s original Cabinet to still be in office.

“Holder was under attack for a good period of time, and the president obviously watched all that up close,” said Matt Miller, Holder’s former spokesman who attended the White House ceremony Thursday. “When you’re on the receiving end of those attacks as the president, you understand what it means to get through it.”

Their bond also was the subject of some envy among other Cabinet officials, who felt Holder had better access to the president.

On one occasion in 2010, Holder reportedly considered leaving the administration in the wake of criticism about his performance and appeared depressed about his mother’s death. He was talked out of it by Obama senior adviser Valerie Jarrett, according to an account from Daniel Klaidman in “Kill or Capture: The War on Terror and the Soul of the Obama Presidency.”

“This will not be good for you and it will not be good for your friend, the president,” Jarrett told Holder in a scene recounted in the book.

A decade apart in age, Obama, 53, did not quite view Holder, 63, as a mentor, associates said, but rather as someone whose advice and guidance he had come to value during his early days on the campaign trail for the White House in 2008. Holder accompanied Obama on campaign trips to Iowa and New Hampshire, and the future attorney general also became close with Jarrett, one of Obama’s closest friends from Chicago.

“I chose him to serve as attorney general because he believes, as I do, that justice is not just an abstract theory, it’s a living and breathing principle,” Obama said Thursday.

It was on the issues of race and civil rights that Holder came to play perhaps his most important role for the president. From the earliest moments of his tenure at the Justice Department — when he labeled the United States a “nation of cowards” when it came to confronting racial inequality — Holder appeared more willing to speak out forcefully on race relations in a way that Obama, who had taken office on a pledge to heal the nation’s divisions, felt unable or unwilling to do.

Holder denounced Florida’s “stand your ground” laws after the shooting death of teenager Trayvon Martin in 2012. Obama, who had reacted cautiously to the shooting, weighed in more deeply the following year after a jury acquitted George Zimmerman, who identified himself as Hispanic. The president said during a 20-minute appearance in the White House briefing room that Trayvon “could have been me.”

“They have a very similar outlook on the world. Both men have often found themselves with the distinction of being the first,” said Tony West, the former associate attorney general who left the administration this month. “That carries with it a set of expectations and sometimes burdens that not everyone who is successful carries. There was a bond between them based on that.”

Holder regularly coordinates his summer vacation on Martha’s Vineyard to overlap with Obama’s and Jarrett’s, and his wife, Sharon Malone, has become good friends with first lady Michelle Obama.

Last month, the Holders and Obamas had dinner on the Vineyard, along with national security adviser Susan Rice and former U.S. trade ambassador Ron Kirk and their spouses. Holder had reportedly planned, later in his vacation, to discuss his future with Obama, with associates predicting that the attorney general would leave by year’s end.

But the follow-up meeting never happened, as Holder departed the island to deal with the fallout from the racially-charged protests in Ferguson, Mo., after a white police officer shot and killed an unarmed African American teenager.

Holder launched a federal civil rights probe, and he visited the community, speaking on personal terms about growing up as a black man who had his own distrust about law enforcement.

“He was showing the capacity to empathize with the important needs of law enforcement and the important expectations of the community,” said Labor Secretary Thomas Perez, who previously served as the head of the Justice Department’s civil rights division. “But he was also mirroring personal and professional life experiences very similar to the president’s. That’s really a synergy.”