He headed the U.S. government’s immigration enforcement agency during one of its most controversial periods, and as the nation’s focus was on reforming the system.

But now John Morton is calling it quits.

On Monday, he announced that he is leaving the job after more than four years.

He says in a note sent to Immigration and Customs Enforcement employees Monday that he's leaving his job at the end of July and to take a position at a private company. He did not identify the company.

Morton, who has previously worked for the Justice Department, was confirmed by the Senate in May 2009. In his note to ICE employees, Morton thanked them for their work.

During his tenure, the Obama administration has boasted deporting nearly 400,000 people annually. ICE is also responsible for enforcing federal customs laws.

Immigration flared as a controversial, bitterly debated topic during Morton’s tenure. Immigration advocates who wanted more lenient policies blamed ICE officials for what they saw an overzealous pursuit of undocumented immigrants who had no criminal record and posed no national security threat.

And he got blamed by conservatives who blamed his office for not doing enough to go after undocumented immigrants, and for allowing what they came to call “immigration anarchy.”

Efforts to reach Homeland Security officials were unsuccessful.

Morton’s resignation comes as the Senate is debating a bipartisan bill that would, in essence, tighten border security, interior enforcement but also provide a path to legal status for many of the estimated 11 million undocumented immigrants living in the United States.

Chris Newman, Legal Director for the National Day Laborer Organizing Network, said in a statement that Morton had “fractured an already broken immigration system, it did tremendous damage to civil rights, and it served as a ‘force multiplier’ for the unjust status quo.”

“During his tenure, ICE operated under an self-imposed deportation quota. . .With his departure, the President now has an opportunity to close the gap between his rhetoric and his policies on immigration. Was ICE a rogue agency, or was it just following orders?  While we celebrate the removal of Morton, the deportation machine he helped build remains in place.”

Dan Stein, executive director for the Federation for American Immigration Reform, which favors strict immigration enforcement, said the Obama administration's office leaves immigration officials little discretion for enforcing the law.

“Mr. Morton’s resigning changes nothing," Stein said. "His successor will be bound by the same ‘no-enforcement’ policies that have so profoundly eroded congressional and public confidence in this administration’s willingness to carry out the immigration laws enacted by Congress."

The Associated Press contributed to this report.

Elizabeth Llorente can be reached at elizabeth.llorente@foxnewslatino.com

Follow Elizabeth Llorente on https://twitter.com/Liz_Llorente

Like us at facebook.com/foxnewslatino