WASHINGTON — It wasn't difficult for Barack Obama and Eric Holder to be in the same orbit. Both were sons of immigrants, Columbia Ivy Leaguers, basketball fans and prominent African-American political figures.
They first met nearly 10 years ago, dinner guests of a mutual Washington friend who seated Holder next to the newly elected senator from Illinois.
On Thursday, Obama announced Holder would be stepping down as his attorney general, one of his longest serving Cabinet members.
"This is bittersweet," the president said.
Holder, who will stay on the job until his successor is confirmed by the Senate, was at his side.
"In good times and in bad, in things personal and in things professional, you have been there for me," he told Obama.
Indeed, over the course of six years on the job, Holder has had his ups and downs. He also has become a rare figure: a close Washington friend of the president.
As attorney general, Holder aggressively enforced the Voting Rights Act, addressed drug-sentencing guidelines that led to disparities between white and black convicts, extended legal benefits to same-sex couples and refused to defend a law that allowed states to disregard gay marriages. He oversaw the decision to prosecute terror suspects in U.S. civilian courts instead of at Guantanamo Bay, Cuba, and helped establish a legal rationale for lethal drone strikes on suspects overseas. All were Obama priorities.
He has also been Obama's point man in the federal response to the racial tensions in Ferguson, Missouri, where a white police officer shot and killed an unarmed 18-year-old African-American last month.
"His greatest legacy has been in the areas of civil rights and race," said Carl Tobias, a professor at the University of Richmond School of Law. He said Holder aimed for a frank discussion in the U.S. about issues surrounding race with a dialogue "that intrinsically defies completion and so remains unfulfilled."
While his enforcement of civil rights laws and fight against voter ID laws made him a champion of civil rights groups, they also made him a top target of conservatives, who said he put race at the forefront and endangered the integrity of elections.
Early on, he was roundly criticized for an ultimately abandoned plan to try terrorism suspects in New York City. A botched gun-running probe along the Southwest border prompted Republican calls for his resignation, and many liberals accused him of failing to hold top bankers accountable for the economic meltdown.
John Fund and Hans Von Spakovsky, conservative authors of a critical book on Holder, "Obama's Enforcer: Eric Holder's Justice Department," wrote that Obama found in Holder "both a kindred spirit and a heat shield against criticism that would often be directed at the White House."
Yet, some in the White House also believed Holder created political problems for the president.
Under his watch, the Justice Department cracked down on journalists reporting on national security matters. The department secretly subpoenaed Associated Press phone records and used a search warrant to obtain some emails of a Fox News journalist as part of a separate leak investigation. The cases created a furor, and Obama ordered Holder to review the department's policies, resulting in tougher guidelines for obtaining reporters' phone records and email.
In an interview Thursday, Holder said Obama respected the separation between the White House and the department and let the department "do those things I thought appropriate."
He said his biggest regret was "the failure to pass any responsible and reasonable gun safety legislation after the shootings in Newtown." He said he thought the nation would embrace change that was "not radical but really reasonable" on gun safety after the massacre at the Connecticut elementary school.
As for the civil rights uproar in Ferguson, Holder said he's not sure whether the Justice Department will finish its investigation into the shooting before he leaves. "I don't want to rush them," he said.
Holder and his wife have grown close personally to the Obamas and recently vacationed together on Martha's Vineyard in Massachusetts. Obama said Holder told him over the summer of his timing for retirement.
Obama noted that Holder's father was an immigrant from Barbados who served in World War II only to return to a segregated nation.
"But he and his wife raised their son to believe that this country's promise was real, and that son grew up to become attorney general of the United States," Obama said. "And that's something."
That Washington dinner party 10 years ago had been hosted by Ann Walker Marchant, a cousin of Obama adviser and confidante Valerie Jarrett. Marchant knew the two men were interested in the law, were passionate sports fans and each played basketball.
"I sat them next to each other," she said. "They talked the entire night."
Associated Press writers Pete Yost and Nedra Pickler contributed to this report. Follow Jim Kuhnhenn on Twitter at http://twitter.com/jkuhnhenn