President-elect Donald Trump’s feud with the intelligence community is already costing him valuable allies. Ex-CIA Director James Woolsey, dismayed by Trump’s refusal to accept the intelligence community’s assessment that the Russian government meddled in the election, has resigned as senior advisor to the Trump administration. Retired General James Mattis, Trump’s pick for secretary of defense, reportedly has chafed at the fact that General Mike Flynn, the national security adviser-designate, has Trump’s ears on intelligence matters. In response, Mattis “has rejected all of the names the Trump team has offered to be the top intelligence official in the department,” according to The Washington Post. And last Thursday, retired General Marty Dempsey, who had served as chairman of the Joint Chiefs of Staff from 2011 to 2015, tweeted a comment that can only be seen as a jab at Trump: “Intelligence is hard, thankless work. Fortunately, we have dedicated, patriotic, and courageous men and women on the job. Thanks.”

Trump’s willingness to alienate the intelligence community and its allies in the military might seem strange, but it points to something important about his worldview. For all his bluster about making other nations respect America again and fighting terrorism, Trump cares more about domestic security. Here, as elsewhere, he has an “American First” approach—and that’s why he’s been solicitous to police and the FBI, and hostile to the CIA and the Office of the Director of National Intelligence.

Trump has a decided predilection for domestic law enforcement. Despite having Secret Service protection, he continues to maintain a security service made up of ex-FBI agents and ex-cops. During the campaign, Trump worked hard to successfully win the support of the Fraternal Order of Police, the largest police union. Among other promises, Trump offered to overturn President Barack Obama’s executive order forbidding the transferring of military equipment to police departments. A promise to restore “law and order” was a major theme in Trump’s campaign, including a call to restore “stop-and-frisk” in New York. Trump also falsely accused Black Lives Matter of inspiring police killings. This gained Trump many fans in law enforcement, so much so that by some reports parts of the FBI became “Trumpland” in the weeks leading up to the election, eager to leak information discrediting Hillary Clinton.

All of which makes FBI Director James Comey, the man who many Democrats believe cost Hillary Clinton the presidency, an even more powerful figure in Washington than he already is. Ironically, though, he may be the left’s best hope as a bulwark against Trump’s potential abuses.

Less than two weeks before the presidential election, Comey announced that the FBI had discovered more emails related to its investigation into Clinton’s use of a private server, though admitted that “the FBI cannot yet assess” whether the emails were “significant.” That intervention, by reviving the concerns many voters had about Clinton’s honesty, may have swung an election that was decided by 100,000 votes in Wisconsin, Pennsylvania, and Michigan combined. (It was beside the point, and certainly not as well publicized, that Comey announced two days before the election that the newly discovered emails didn’t change the FBI’s original conclusion in July that Clinton shouldn’t be charged for any crime.)