WASHINGTON — One of the most difficult jobs in Washington now belongs to Kevin McAleenan, who President Donald Trump is placing in charge of the Department of Homeland Security after the ouster of Secretary Kirstjen Nielsen on Sunday.

As the new acting secretary at DHS, McAleenan faces the largest wave of illegal crossings at the Mexico border in more than a decade. In Washington, he'll contend with an impatient boss who is demanding an immediate halt to the surge. And to deliver that, McAleenan will have to court Democratic lawmakers with little political incentive to help the White House ahead of the 2020 election.

McAleenan — the current commissioner of U.S. Customs and Border Protection — presents as a natural leader of DHS, a no-nonsense law enforcement official with longtime practical immigration experience. For a president who places a premium on appearances, McAleenan, 47, also looks the part, with close-cropped hair and a stern bearing.

The border cop image belies what is behind it. McAleenan is an attorney with degrees from the University of Chicago and Amherst College who pours over academic reports on migration trends and speaks of international aid as being vitally important to stemming the northward flow of Central Americans. And perhaps most importantly, at a time of great policy upheaval, McAleenan will be a rare Trump administration official who remains in good standing with lawmakers from both parties, someone who knows the nation's immigration quandary has spanned a generation of Republicans and Democrats and comes with no easy fixes.

But can McAleenan be the "tough" guy Trump wants? Can he effectively shut down the border, demonstrating progress on the metric Trump seems to care about most: reducing the number of Central Americans arriving each month?

"When I look back on my lengthy career, I can count on one hand the number of people whose intelligence, honesty and intellect I have the upmost respect and admiration for, and Kevin is one of them," Gil Kerlikowske, who served as CBP commissioner during Obama's second term, when McAleenan was his deputy, said Sunday evening. "I'm glad he'll be there as acting secretary, but he'll be in an incredibly difficult position, and I don't envy him at all."

McAleenan knows the problem well, and he knows how intractable it is, and the momentum it gathers as more and more families leave Central America. In March, U.S. authorities detained nearly 100,000 migrants, according to preliminary DHS figures, the highest monthly total in more than a decade. U.S. border agents and infrastructure have hit "a breaking point," McAleenan declared.

A longtime CBP official who received the nation's highest civil service award from President Barack Obama in 2015, McAleenan has praised the effectiveness of U.S. aid to Central America — immediately putting him at odds with the president, who has cut aid to those countries. And McAleenan refers to the migrants arriving at the border not as scammers looking to cheat their way into the country but as "vulnerable families" who need more humanitarian treatment, urging a fast and responsible screening process that will let true asylum seekers start their news lives in the United States once a court rules on their claims.

"If they don't have a valid claim, we'll repatriate," McAleenan said. "If they do, they'll be released with the certainty that they have asylum with the ability to plan, to invest in a business, to make these choices for schools. Right now, they don't have that. They live with uncertainty for years at a time because the system is broken and overwhelmed."

Raised in Los Angeles, McAleenan sought to join the FBI after the Sept. 11 terrorist attacks, but he was recruited instead to U.S. customs, where he helped develop counterterrorism screening programs. He became the top CBP director for the Los Angeles International Airport, then ascended through the ranks of CBP leadership under Obama.

One Trump official — who is not a CBP staffer — praised him Sunday night as "probably the most competent, capable and intelligent public servant in the entire federal government, along with Gen. Dunford," referring to the Chairman of the Joint Chiefs of Staff, Marine Corps Gen. Joseph F. Dunford Jr.

And he is well-regarded by Democrats, in part because he speaks of border and immigration issues as a neutral, nonpolitical law enforcement professional, not a partisan firebrand.

Whether that is what the president and his top immigration adviser Stephen Miller are looking for on a long-term basis is not clear.

White House aides have said they expect the president to nominate a hard-liner for the permanent DHS job, but such a figure could have a difficult time winning Senate confirmation. McAleenan was confirmed for the top job at CBP with a 77 to 19 Senate vote in March 2018.

If the White House decides that working with Democratic lawmakers on measures to reduce the soaring numbers of asylum seekers crossing the border is the best — or only — way to stop the surge, McAleenan could be one of the few available figures capable of doing that.

McAleenan has repeatedly urged lawmakers to give DHS authority to detain families long enough for U.S. courts to process their immigration claims. Those who do not qualify for asylum would be deported, and he argues that an increase in the number of migrants returned to Central America will deter others from attempting the journey.

It is McAleenan's relatively favorable reputation among Democrats and his ties to the Obama administration that have also made him unpopular with those who want someone more hawkish in the DHS role, whose messaging will be consistent with the president's.

"It is crucial that @realDonaldTrump nominates a strong, respected outsider for Secretary of Homeland Security," the Federation for Immigration Reform (FAIR), a restrictionist group, wrote on Twitter Sunday night. "We've seen what happens when he trusts immigration neophytes or Obama administration holdovers to implement his agenda."

Others questioned Sunday whether the president could legally install McAleenan as acting DHS secretary. The agency hasn't had a deputy secretary in more than a year, and its third-ranking official, Claire Grady, would be next in line after Nielsen departs.

Some of the president's most ardent foes aren't McAleenan fans either. Rep. Joaquin Castro, D-Texas, the chairman of the congressional Hispanic Caucus, called for McAleenan to step down after two Guatemalan children died in December after being taken into CBP custody.

Castro called McAleenan's appointment "deeply disturbing."

During the "zero tolerance" prosecution push last spring, Border Patrol agents working under McAleenan separated more than 2,500 children from their parents, a policy the president was forced to abandon amid public outrage. Nielsen took much of the blame, while McAleenan mostly managed to dodge criticism.

"He cannot be trusted as Acting DHS Secretary based on his record of prioritizing Trump's harmful policies that undermine national security and the economy, and hurt vulnerable families and children at the border," Castro said Sunday in a statement.

But McAleenan has attempted to reach out to Democrats in ways that few other Trump officials have done. When one of the children, 7-year-old Jakelin Caal, fell ill and died of a fast-spreading infection after crossing the border, McAleenan traveled to a remote span of the New Mexico border with Castro and other Hispanic Caucus members to escort them on a tour of U.S. Border Patrol facilities.

Last fall, McAleenan traveled to Central America to visit communities where large numbers of families are leaving, expressing support for security initiatives and programs to alleviate hunger.

In the highlands of western Guatemala, McAleenan visited farms and a coffee cooperative, and he went to meetings with community leaders, where he spoke in basic Spanish and lauded joint U.S.-Guatemalan efforts to address the root causes of migration.

Nielsen is scheduled to leave her post on Wednesday, and McAleenan will assume DHS leadership then, aides said.