President Obama warned his successor, Donald Trump, to not overuse executive orders when he enters the White House in an interview aired Monday.

Obama spoke with NPR and warned President-elect Trump against exercising his authority to issue executive orders because they can be undone by the next president as easily as he signs them, United Press International reported.

After stressing that he always preferred to pass legislation through Congress rather than use executive orders, Obama gave his explanation as advice to Trump.

"Keep in mind, though, that my strong preference has always been to legislate when I can get legislation done," the president told NPR. "In my first two years, I wasn't relying on executive powers, because I had big majorities in the Congress and we were able to get bills done, get bills passed. And even after we lost the majorities in Congress, I bent over backwards consistently to try to find compromise and a legislative solution to some of the big problems that we've got–a classic example being immigration reform, where I held off for years in taking some of the executive actions that I ultimately took in pursuit of a bipartisan solution."

"So my suggestion to the president-elect is, you know, going through the legislative process is always better, in part because it's harder to undo," Obama said.

He added that it would be perfectly legal for Trump to use executive orders, however.

"I think that he is entirely within his lawful power to do so," Obama said.

Critics have castigated Obama for what they call his extensive use of executive orders. In January with over a year to go in office, Obama had issued more executive orders in terms of pages of regulations than any other president. Obama's orders have not been as numerous as those of Bill Clinton or George W. Bush, but some have had substantial effects on policy–like his 2014 action on immigration.

Obama's willingness to use executive orders on important matters has drawn criticism, especially with a statement he previously made about how easy it is to issue them.

"I've got a pen and I've got a phone—and I can use that pen to sign executive orders and take executive actions and administrative actions that move the ball forward," Obama said.