Former Attorney General Eric Holder is defending the Obama administration against criticism from the left about its deportation efforts while warning Democratic presidential hopefuls that the U.S. needs borders.

"The emphasis there was on people who had criminal records, people who posed a danger, a public safety risk," Holder, who served under former President Obama, said of the previous administration's policy in a CNN interview released Saturday.

"Democrats have to understand that ... borders mean something," he added.

Holder expressed disagreement with a proposal embraced by some Democratic presidential candidates to make illegally entering the U.S. a civil offense rather than a criminal offense.

"No, I don't think that's right," he said. "The law that is on the books has been there for about 100 years or so."

"It might send the wrong signal. But it would certainly take a tool away from the Justice Department that it might to use," Holder added.

"It is up to, I think, the Justice Department to use its discretion in an appropriate way, and I don't think this administration's Justice Department is doing that."

Several Democrats seeking their party's 2020 nomination have floated measures to reverse course on immigration policy following backlash over the Trump administration's hard-line stance on the issue.

Some advocates have also taken issue with deportations under Obama, with former Vice President Joe Biden getting pressed on the issue during the latest Democratic presidential debate on Thursday night.

Biden said that Obama "did the best thing that was able to be done at the time" while touting the administration's efforts to defer deportation for young migrants.

Axios reported that U.S. Immigration and Customs Enforcement (ICE) deportations were above 385,000 annually during fiscal 2009 through fiscal 2011 and reached 409,849 in fiscal 2012. The numbers dropped in the later years of the Obama administration.

In fiscal 2017, ICE under the Trump administration deported 226,119 people and more than 250,000 in fiscal 2018.