Mark A. Morgan testifies Sept. 13, 2016, at his first hearing as U.S. Border Patrol chief at the Cannon House Office Building before the Border and Maritme Security subcommittee on interior checkpoints and defense-in-depth. (Donna Burton/ U.S. Customs and Border Protection)

The chief of the U.S. Border Patrol has resigned after only six months on the job, one day after President Trump announced plans to ratchet up immigration enforcement and build a wall along the U.S.-Mexico border, officials said Thursday.

Officials familiar with the decision said that Morgan — a career FBI official who was the first outsider to lead the agency responsible for securing the U.S. borders — was removed by Kevin K. McAleenan, acting commissioner of the U.S. Customs and Border Protection agency.

“It was a change in leadership,’’ said one official, who spoke on condition of anonymity to discuss personnel matters. But the official could not describe the reason for Morgan’s removal, or whether the Border Patrol union or the White House were involved.

His resignation is effective Jan. 31, officials said.

Morgan had clashed with the powerful Border Patrol union, which endorsed Trump for president and whose leaders were present at Trump’s announcement of his immigration crackdown at Department of Homeland Security headquarters Wednesday.

(The Washington Post)

Gil Kerlikowske, former commissioner of U.S. Customs and Border Protection, which oversees the Border Patrol, said in an interview that the union never supported Morgan for the job and appeared to be behind his departure.

“The union has been very vocal about someone from outside of the Border Patrol becoming the head of the Border Patrol,” Kerlikowske said. “The union supported this candidate for president, and now very much appears to be directing things – which is absolutely unheard of in law enforcement. The union used their influence to have him removed.’’

Brandon Judd, president of the National Border Patrol Council, which represents 16,500 agents, said the union started actively lobbying Trump’s transition team shortly after the election to replace Morgan, who the union believed “did not make border security a priority.” For example, Morgan had diverted agents from the field to process migrants at ports of entry, a role traditionally handled by another unit at Customs and Border Patrol, Judd said.

“I assume they sent our concerns up the chain,” he said. “Do I know we had complete and total sway” with the Trump team in pushing Morgan out? “I don’t think so. Do I think we had a voice? Absolutely.”

Judd said he learned that Morgan had submitted his resignation at midday Thursday when he received a call on his cellphone from McAleenan. “He told me that ‘for border security reasons, we need to go in a different direction.’ ”

A few weeks after Trump’s election, the conservative website Breitbart.com published an op-ed by the union’s executive board. The piece was titled, “The chief Obama gave us is a disgrace.” It criticized Morgan’s leadership of the agency, in part latching onto a statement he made to members of Congress that said he supported “comprehensive immigration reform.” The union called this a partisan view.

Morgan could not immediately be reached for comment.

(Zoeann Murphy/The Washington Post)

Union spokesman Shawn Moran, responding to Kerlikowske’s comments, said: “We supported President Trump because he was the only candidate who talked about taking action on border security. His actions over the past few days show it was not just campaign rhetoric, but a true conviction to protect Americans from the dangers of illegal immigration.”

He accused Kerlikowske of rolling back enforcement operations and “preventing agents from doing their jobs.”

“Gil Kerlikowske had multiple opportunities to work with the union to help protect Americans. He chose not to do so.”

McAleenan praised Morgan to agency staff “for his unwavering dedication to our border security mission” and “his lifelong career in service to the nation.’’ His statement did not explain the chief’s departure.

The Border Patrol will have an important role in enforcing Trump’s crackdown on the nation’s estimated 11 million illegal immigrants. The president signed executive actions Wednesday to order the construction of his controversial southwest border wall and cut off funds to cities that do not report undocumented immigrants to federal authorities. Trump also called for thousands of additional Border Patrol agents. There are now about 21,000.

Brandon Judd, president of the National Border Patrol Council, was standing behind Trump as the president signed Wednesday’s executive order on border security. Morgan was not. And in his speech to DHS employees, Trump called on Judd to stand and be recognized.

Morgan, 52, started his career as a Los Angeles police officer before ascending the ranks of the FBI. Kerlikowske chose him for the Border Patrol job, overlooking others who came up through the ranks, to change what is considered, even by law enforcement standards, to be an insular culture. Many agents, including the Border Patrol union, opposed the selection at the time, saying an outsider could never gain agents’ trust.

Morgan told The Washington Post in an interview last September that his first priority was to change the culture of the agency, which had for years faced allegations of an overly confrontational approach in its enforcement that resulted in multiple fatal shootings of illegal immigrants and a lack of accountability in investigating misconduct.

Morgan said he wanted to solve those problems. “ It was a culture of not getting out and talking about the issues, not being transparent about the process and it drove the perception there was a culture problem,” he told The Post.

Two years ago, Kerlikowske had brought Morgan over from the FBI to run the internal affairs office at the larger Customs and Border Protection agency after removing the longtime official in the job. That official had been criticized for failing to investigate multiple allegations that Border Patrol agents had used excessive force on migrants. Morgan was then promoted to run the Border Patrol in July.

During his short tenure, Morgan enforced new use-of-force policies in the agency’s training academy curriculum that encouraged recruits to turn to other strategies to defuse encounters that could get violent. He was working with agents to help them develop better intelligence on drug cartels and smugglers behind illegal border crossings, and was also seeking to create a system to better review cases in which agents fire their weapons.

Law enforcement officials describe Morgan — who was a career, not political appointee — as a careerist, as opposed to being a political partisan.

“He’s not a political guy,” said Jim Pasco, executive director the nation Fraternal Order of Police. “I’ve never heard a bad thing about him – and I work for a union, we hear bad things about everyone.”