Seven weeks ago, Attorney General Jeff Sessions was left for dead politically. President Trump had publicly berated him, called him beleaguered and weak, and left him twisting in the wind. Pundits predicted Trump would soon fire him, or he would be forced to step down.

But over the summer, Sessions weathered the storm. On Tuesday, he stepped out before a packed room of reporters and a phalanx of television cameras, smiled and then enthusiastically announced that the Trump administration was rescinding President Barack Obama's program that allowed 800,000 undocumented immigrants, known as "dreamers," to live and work in the United States without fear of being deported.

"The effect of this unilateral executive amnesty, among other things, contributed to a surge of minors at the southern border that yielded terrible humanitarian consequences," Sessions said. "It also denied jobs to hundreds of thousands of Americans by allowing those same illegal aliens to take those jobs."

After reading a 10-minute statement, Sessions waved to the crowd and left without taking any questions from reporters.

It was a big moment for Sessions, announcing the end of Obama's immigration protection, and one that would not have been predicted earlier this summer when he and Trump were not even speaking. For Sessions, a hard-liner on immigration, it was also the culmination of a legislative career in which he earned a reputation as the "anti-immigration warrior."

As the senator from Alabama, Sessions fiercely opposed for years any efforts by Congress to reform the nation's immigration system to help those who were in the country illegally. As a senator, Sessions proposed a bill that would impose a five-year mandatory minimum prison term on those found to have reentered the country illegally. He advocated making changes even in the legal immigration system because of his fears that people from other countries could take Americans' jobs.

As attorney general, Sessions' department has defended Trump's travel ban, which suspends both the issuance of visas to residents of six Muslim-majority countries and the U.S. refu­gee program. Sessions has moved to strip Justice Department funding from "sanctuary cities," which do not produce documents to prove they are communicating with federal officials about undocumented immigrants.

Two weeks ago, Sessions lashed out at Chicago and its leaders and tied local policies about undocumented immigrants to the city's soaring crime rates.

Civil rights groups lambasted the announcement by Sessions, who they have criticized on a range of issues from voting rights to police reform.

"Today is a cruel day for Dreamers, our families, and all Americans," Lorella Praeli, director of immigration policy and campaigns at the American Civil Liberties Union, said in a statement.

"We have 800,000 examples of how DACA [Deferred Action for Childhood Arrivals] strengthened America, including my sister Maria, a graduate of Quinnipiac University, an immigration activist, and a DACA-recipient."

Sherrilyn Ifill, president and director-counsel of the NAACP Legal Defense and Educational Fund (LDF), called Sessions's announcement "a disastrous and cruel decision that will devastate the lives of hundreds of thousands of children and their families."

There is no financial, national security or sound public policy consideration driving this decision," Ifill said.

Others, including Texas Attorney General Ken Paxton, praised Sessions saying the DACA program "went far beyond the executive branch's legitimate authority."

Sen. Tom Cotton (R-Ark.) praised the administration for taking "a first step toward cleaning up the mess that President Obama's unlawful amnesty left behind."

"President Trump is right that this amnesty would never have stood up in court," Cotton said in a statement. "Yet, we now face a situation where 800,000 people, who were brought to our country as minors, face legal limbo."

Texas and some other states threatened to sue the Trump administration if it did not end DACA by Tuesday. Sessions was among the senior Trump aides who lobbied the president to end DACA and he wrote a memo calling the program unconstitutional, saying Obama improperly created DACA after Congress refused to authorize it.

"The executive branch, through DACA, deliberately sought to achieve what the legislative branch specifically refused to authorize on multiple occasions," Sessions said in his statement to reporters. "Such an open-ended circumvention of immigration laws was an unconstitutional exercise of authority by the executive branch."

A Justice Department official said Sessions was chosen to make the DACA announcement because of the legal deadline the department was facing.

"It was determined that Attorney General Sessions should announce this decision because of the pending litigation on DACA and the need to discuss the legal issues," said the official, who spoke on the condition of anonymity because he was not authorized to discuss the decision. "We were the first out of the gate because the trigger point was the lawsuit, and we are the government's lawyers."