WASHINGTON (AP) -- Eyes glistening, President Barack Obama bid an affectionate farewell Friday to Attorney General Eric Holder. It was a sequel to an emotional going-away at the White House last year, but this tribute came with a soulful surprise.

"Eric is really just milking this departure thing for everything that it's worth," Obama said at a Justice Department ceremony to unveil the outgoing Cabinet member's official portrait. "I mean, golly."

But even Obama got upstaged this time.

After the president and the attorney general had concluded their remarks, Aretha Franklin, the "Queen of Soul," made an unannounced appearance in the Justice Department hall. Holder, stunned, genuflected. And Franklin stepped behind the lectern to sing "America the Beautiful" with an homage to Holder.

Singer Aretha Franklin, left, hugs outgoing Attorney General Eric Holder, as President Barack Obama applauds. (AP Photo/Jacquelyn Martin)

In his own remarks, Obama noted Holder's tenure as the third-longest serving attorney general. Holder also is the first black man to hold the job.

"I know it felt even longer and I'll just come out and say it. He's been one of our finest," Obama said.

Obama said Holder had led the department with integrity and helped make the U.S. "free and more just." He praised Holder as a "great friend" and a "great public servant" and brushed away tears at the conclusion of his brief remarks.

Holder is staying on the job until the Senate confirms his successor, which is expected soon. The Senate Judiciary Committee on Thursday approved Obama's choice of U.S. Attorney Loretta Lynch to succeed Holder. She would be the first black woman to be the nation's top law enforcement officer.

In a veiled reference to Rudolph Giuliani's assertion that Obama did not love his country, Holder declared "those who have loved this nation most have dared greatly and have sought to change the status quo for the better." He offered a litany of examples, from Abraham Lincoln and Jackie Robinson to Martin Luther King Jr. and Harvey Milk. Then he paused and added pointedly, "Barack Obama."

Holder offered special thanks to Sen. Patrick Leahy, the former Democratic Senate Judiciary Committee chairman. Leahy, of Vermont, defended Holder during Holder's clashes with Republican lawmakers who held him in contempt in the House over a document dispute arising from a gun-trafficking operation known as Fast and Furious.

"In tough times, both professional and personal, this is a man who has been there for me," Holder said at the top of his remarks.

© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. Learn more about our Privacy Policy and Terms of Use.