When the House Subcommittee on Government Operations held a hearing in April 2015 titled "The Worst Places to Work in the Federal Government," an agency manager at the Department of Homeland Security was called in to testify.

"[DHS] rests as the worst place to work among cabinet agencies," Rep. Mark Meadows, R-N.C., said at the time.

The third largest federal department had just received an abysmal 44 percent score in the annual Federal Employee Viewpoint Survey. Fewer than half of its staff felt that morale, leadership and compensation deserved positive ratings.

But those days are gone, according to DHS employees and one senior administration official who spoke to the Washington Examiner on the condition of anonymity.

After President Trump issued his executive order temporarily barring immigration from seven Muslim-majority countries, multiple reports suggested that DHS officials, along with staffers at other federal agencies, were not consulted prior to the roll-out and were not pleased with what transpired afterwards.

"The policy team at the White House developed the executive order on refugees and visas, and largely avoided the traditional interagency process that would have allowed the Justice Department and homeland security agencies to provide operational guidance," CNN had reported earlier this week.

Then came Tuesday's press conference with DHS Secretary John Kelly, a no-nonsense retired Marine Corps general who said the order "wasn't a surprise" and vowed to execute new and existing immigration laws "humanely and with professionalism."

Kelly's remarks to reporters, and his willingness to enforce laws that the administration believes will protect Americans, "re-energized a lot of us because for so long we've been vilified for doing our jobs, and here was someone finally standing up for us," said one Immigration and Customs Enforcement (ICE) agent who was not authorized to speak on the record.

ICE is one of 22 agencies incorporated into DHS and likely to play a critical role in administering Trump's immigration agenda.

According to one senior administration official, "a high-ranking Customs and Border Protection officer approached Kelly after [Tuesday's] press conference and said, 'Mr. Secretary, we haven't had anybody at your level say a kind word about our officers for more than five years.'"

"They're all breathing a huge sigh of relief and realizing that now they can actually get to work and ... execute the oath that they took to this nation," the official said. "I'm convinced that morale has just skyrocketed in the last 10 days."

Low employee morale has plagued DHS since the Bush administration, but many claim it became exponentially worse during the Obama years when non-enforcement directives from the former president were common practice.

"ICE is at a point now where agents are being told to break federal law. You can imagine these law enforcement officers are being put in a horrible position," Kansas Secretary of State Kris Kobach, who was once under consideration to be Trump's DHS secretary, told reporters in 2012 while representing nearly a dozen ICE agents who had sued the Obama administration in federal court.

"We spent eight years handcuffed by the previous administration," Joshua Wilson, a spokesman for the San Diego chapter of the National Border Patrol Council, told the Washington Examiner.

"Border patrol agents never felt the Obama administration or [former] DHS Secretary had our back at any point," he explained, adding that "morale is certainly on the upswing."

Wilson said Kelly brings a "stellar résumé of leadership" with him to DHS but more importantly, "he is also committed to enforcing the policies of this administration and laws that were on the books long before President Trump entered office."

One DHS source praised Kelly, but was careful to note that Trump also deserves credit for the sudden boost in agency-wide staff satisfaction. The source highlighted the president's visit last week to the department's Washington headquarters, during which he signed his first two immigration-related executive orders and offered encouraging words to employees.

"Agents haven't been allowed to do their jobs. That's going to change," Trump had told his highly receptive audience.