The Department of Homeland Security—the nation’s newest cabinet agency, founded only in 2002—is a mess. Everyone knows it. It’s taken formerly well-functioning agencies (e.g., FEMA) and made them worse, split up some (Customs) in ways that made them worse, combined others in ways that made them worse, and created perhaps the worst functioning federal agency of them all: the TSA.

More troubling, it combines two vastly different functions. On the one hand, DHS is supposed to bring under one roof all of our efforts to secure the border against unwanted traffic in goods and people. It’s also supposed to act as a domestic security force, much like a traditional European ministry of the interior. The two functions do not belong together. The former is something any competent nation could do well if it wanted to. The latter is inherently difficult and murky in the best of circumstances. Moreover, most of the real power to do anything about domestic security rests with other agencies, particularly the intelligence community and the FBI. In doing its second job badly, DHS preoccupies the time and energy of senior management to not much effect beyond ensuring that they will do the Department’s first, and eminently do-able job, also badly. Add to that the fact the bipartisan ruling junta does not want the border secured and so does everything it can to undermine the Department and its morale.

It’s no wonder that almost no one of substance wants to run it. With one apparent exception.

Kris Kobach is arguably the smartest, best-informed and most vigilant immigration patriot in the country today. True, he’s no expert on domestic counter-terrorism, but that shouldn’t count against him. The Department he aspires to lead is lousy at it anyway. The best thing the administration can do to protect America from attack is to place sound people at the Defense Department, the intelligence community, and the National Security Council. The transition is off to a strong start.

The DHS Secretary doesn’t need to be a counter-terror whiz. He needs to be a barn-burner at the agency’s first and fundamental task: protecting the border. Which Kobach is.

Mickey Kaus’ analysis of the stakes is spot on. Trump, who is not seasoned in the ways of Washington, perhaps can be forgiven for not understanding—yet—what he’s up against. But surely Pence and Sessions know. The one-two punch of Sessions at Justice and Kobach at DHS will serve the political purpose of shoring up Trump’s base and the policy of purpose of delivering on his most fundamental promise.

Giving DHS to someone on the basis of loyalty or “diversity” or anything other than a true commitment to its core task would be a profound mistake—one that the President-elect, and his country, will pay for in the years and decades to come.

Kris Kobach for DHS.