Image copyright Getty Images Image caption Mr Holder is staying on as attorney general until his successor is confirmed

US Attorney General Eric Holder has announced he is stepping down, as President Barack Obama praised him as "the people's lawyer".

One of the longest serving members of the president's cabinet, Mr Holder led the justice department for six years.

Mr Holder is the first black US attorney general and has had the fourth longest tenure in the post in history.

Mr Obama praised his prosecution of terrorism suspects, his protection of voting rights, and on other issues.

The top law enforcement officer in the US, Mr Holder will remain in the job until his successor is named and confirmed by the Senate.

Mr Obama has not said whom he will nominate to the position.

Making the announcement at the White House, Mr Obama praised Mr Holder's record on a number of issues central to his tenure at the White House.

He singled out Mr Holder's successful prosecution in civilian courts of hundreds of terrorism suspects, his fervent protection of the voting rights of minorities, his push for equal rights for gays and lesbians, and his move for sentencing reform, especially for non-violent drug offences.

"He believes, as I do, that justice is not just an abstract theory - it's a living and breathing principle," said Mr Obama, who is a personal friend of Mr Holder. "It's about how our laws interact with our daily lives."

'Founding ideals'

Mr Holder said he had "mixed emotions" about stepping down, but said that while he was leaving the justice department, he was "never leaving the work".

"I will continue to serve and try to find ways to make our nation even more true to its founding ideals," he said.

Image copyright AP Image caption Holder was sent to Ferguson to ease tensions between the black-majority population and mostly white police force

In an interview with the Associated Press, Mr Holder said his biggest regret was "the failure to pass any responsible and reasonable gun safety legislation" after the 2012 massacre at a primary school in Connecticut.

Among his achievements, some highly controversial, is reduced prison sentences for non-violent offenders and some federal drug offenders.

"Thanks to his efforts, since I took office, the overall crime rate and the overall incarceration rate have gone down by about 10%," Mr Obama said. "That's the first time that they've declined together, at the same time, in more than 40 years."

Mr Holder also refused to defend in court a law that barred the federal government from recognising same-sex marriages. The Supreme Court overturned that law in 2013, which Mr Obama said vindicated Mr Holder's decision.

Under Mr Holder, the justice department sued Texas and North Carolina for rewriting their voting laws in ways he said would disproportionately restrict the ability of black and Hispanic voters to cast a ballot.

Image copyright Reuters Image caption Mr Holder was found in contempt of Congress over the Fast and Furious matter

Found in contempt

The attorney general recently played a key role in the administration's response to the shooting of an unarmed black teenager by police in Ferguson, Missouri.

In addition to those accomplishments celebrated by Mr Obama, Mr Holder's justice department aggressively pursued leaks to the news media, subpoenaing phone records from Associated Press reporters and using a search warrant to gain emails from a Fox News reporter.

He was also embarrassed by a botched gun trafficking operation called Fast and Furious, in which US agents lost track of hundreds of firearms sold in Arizona they believed were ultimately bound for Mexican drug traffickers.

An internal inquiry found no evidence he knew about the controversial tactics.

But Mr Holder's refusal to hand over justice department documents on the matter to the Republican-led House of Representatives led the chamber to find him in contempt.