By COLLEEN LONG and JILL COLVIN, Associated Press

WASHINGTON (AP) — President Donald Trump and Homeland Security chief Kirstjen Nielsen never quite clicked personally as the president chafed at her explanations of complicated immigration issues and her inability to bring about massive changes at the U.S.-Mexico border.

With Nielsen's departure now considered inevitable, her eventual replacement will find there's no getting around the immigration laws and court challenges that have thwarted the president's hard-line agenda at every turn — even if there's better personal chemistry.

The list of potential replacements for Nielsen includes a career lawman, two military officers and former acting U.S. Immigration and Customs Enforcement head Thomas Homan — a tough-talker who echoes Trump's border rhetoric.

"A good DHS person ought to be able to scare America" about heroin coming over the border and illegal crossings, former Trump campaign adviser Barry Bennett said. "But, the system is so against you legally and structurally."

Trump soured on Nielsen in part over frustrations that she has not been able to do more to address what he has called a "crisis" at the U.S.-Mexico border. Trump has seized on statistics about illegal border crossings that have grown on her watch after reaching a record low early in his term. More than 50,000 people were detained at the southwest border in October — the highest monthly total since 2014 and up dramatically from 11,000 in April 2017.

"It's a tough job. You're someone who has to get good numbers on border crossing. He's always looking for that and it's tough," Bennett said.

But illegal border crossings could also be tied to the seasons — some experts argue that more migrants make the dangerous journey through the desert when it's not as hot. And Nielsen has largely carried out the president's wishes, including pushing for funding for his border wall and defending the administration's now-abandoned practice of separating children from parents.

She also moved to abandon long-standing regulations that dictate how long children are allowed to be held in immigration detention, and was working to find space to detain all families who cross the border. She limited what public benefits migrants can receive, and last week put regulations in place that circumvent immigration law to deny asylum to anyone caught crossing the border illegally. Nearly everything has been challenged or watered down by the courts.

"I don't think they're going to get the magic person," said Andrew Selee, president of the Migration Policy Institute, a nonpartisan think tank that studies migration issues. "Nielsen had been fairly hard-line implementing what Trump wants, but she's not willing to skirt around the law to do it."

And it's not just about policy.

Trump has also told allies that he never fully trusted Nielsen, whom he associated with President George W. Bush, a longtime foe. And he has told those close to him that he feels, at times, that she has stronger loyalty to her mentor — chief of staff John Kelly — than to the president. On occasions when she has tried to explain the complicated legal challenges associated with instituting some of his policies, Trump has exploded, belittling her in front of colleagues and blaming her for not being able to skirt the law.

Trump had been expected to dismiss Nielsen as soon as Tuesday as part of a post-midterm elections shakeup that is likely to include a slew of other departures.

But her departure has been postponed for now in part because there was no obvious successor, according to two people familiar with the discussions who were not authorized to speak publicly and spoke on condition of anonymity. She has no deputy secretary, and the next in line would be Claire Grady, the undersecretary of homeland security for management.

Trump said in an interview with The Daily Caller on Wednesday that he'd make a decision on homeland security "shortly."

Potential candidates include U.S. Customs and Border Protection Commissioner Kevin McAleenan, and two military officers — Transportation Security Administration head David Pekoske, formerly of the Coast Guard, and Maj. Gen. Vincent Coglianese, who runs the Marine Corps Installations Command, according to people familiar with the discussions.

A Customs official didn't return a call seeking comment. A spokesman for Coglianese said he had not been approached by anyone regarding a position with DHS and was focused on his current job.

Pekoske said at an unrelated news conference that Nielsen was a strong leader.

"I have an outstanding relationship with Secretary Nielsen," he said.

Homan is regarded as a top pick, according to people familiar with the discussions. He was nominated by Trump to lead Immigration and Customs Enforcement, but stepped down before he was confirmed, and it's not clear if his nomination would pass the Senate or if he'd even be up for the job. He left in part because he wanted to spend more time with his family.

"I won't speculate what the president will do," he said on Fox News, but praised Nielsen as a "strong secretary" and said she was succeeding in a difficult job.

"It's a 24/7/365 job," Homan said. "Fifty percent of America hates you 100 percent of the time, you can't win on this topic because it is so divisive."