President Trump will be picking a new fight with Senate Republicans if he decides to renew his past policy of separating families detained at the border as a way of stopping the wave of immigrants.

Trump is expected to select a hard-liner to replace Homeland Security Secretary Kirstjen Nielsen, who was ousted on Sunday - reportedly after she resisted returning to the policies that led to children being taken from their parents at the border.

The family separations created deep unrest among congressional Republicans ahead of the midterm elections, and Senate GOP sources warn that if Trump taps a hard-liner to replace Nielsen, it could lead to a brutal confirmation battle.

Sen. John Cornyn (Texas), a member of the Republican leadership team, said "one thing we all agree on now is families ought to be kept together as much as possible."

He said the outcome of a Senate confirmation process to replace Nielsen would depend on whom Trump nominates.

"Depends on who it is but it's going to take some oxygen," Cornyn said when asked whether GOP leaders would be able to coalesce 50 votes around any nominee.

Trump may also have a battle on his hands with Republicans over the confirmation of Herman Cain to the Federal Reserve. Cain was accused of sexual misconduct while he served as a board member and president of the National Restaurant Association. His confirmation battle could reopen a conversation for Republicans about sexual harassment months after the nasty battle over Supreme Court Justice Brett Kavanaugh's confirmation.

Senate Republicans gained seats in the midterm elections, largely because of a favorable map that left Democrats defending more than two dozen seats - including in states that were easily won by Trump in 2016.

But the party faces a more difficult map in 2020. While Sens. Susan Collins (Maine) and Cory Gardner (Colo.) are the only Republicans running in states that Trump lost, Sens. Martha McSally (Ariz.), Thom Tillis (N.C.), Joni Ernst (Iowa) and David Perdue (Ga.) are among the Republicans who could face competitive races.

A senior Senate GOP aide predicted that if Trump nominates someone who endorsed a return to family separations at the border to succeed Nielsen, the candidate will run into bipartisan opposition.

"If Trump wants to reinstate the family separation policy, that would be met with a lot of resistance. If he's looking for a DHS secretary to do that for him, that would be a cluster," the aide said.

NBC News reported Monday that Trump has urged administration officials for months to reinstate an aggressive policy of separating migrant families detained at the border, viewing it as an effective deterrent to illegal immigration.

Nielsen, however, resisted Trump's pressure and argued that federal court orders would prevent the administration from reinstating the policy, according to NBC.

Trump on Friday called the Flores Settlement, a 1997 legal settlement between a migrant and the Clinton administration that requires the government to release children from immigration custody after 20 days, "a disaster for our country."

Cornyn, a senior member of the Judiciary Committee, argued on Monday that the Trump administration wouldn't be able to return to last year's discarded family separation policy even if it attempts to do so.

"I think they're constrained by the Flores decision and current law," he said. "I'm not going to assume they're going to break the law."

The Department of Homeland Security (DHS) and the Department of Health and Human Services proposed changes in 2018 that would lead to the dissolution of the Flores Settlement and would likely spark a legal battle.

Withdrawing from the settlement would allow the administration to keep families in detention for longer periods and avoid the political land mine of separating children from their parents.

Nielsen's resignation has come as part of a broader effort to purge the Department of Homeland Security of officials who were close to former White House chief of staff John Kelly, who served as DHS secretary for six months in 2017.

White House senior policy adviser Stephen Miller, who has pushed the president and the rest of the administration to take a strong stand against illegal immigration, is reportedly behind the shake-up.

Senior Republicans on Monday expressed concern about the turmoil.

Senate Homeland Security Committee Chairman Ron Johnson (R-Wis.) said Monday that he is "concerned with a growing leadership void within the department tasked with addressing some of the most significant problems facing the nation."

Cornyn said some voices in the administration "are creating more problems for the administration by losing senior leadership in these important positions."

"That's bound to make the president's and the administration's job harder," he added.

Advocates who favor stricter border controls say that Nielsen didn't have enough experience coming into the job.

"She had a mixed record. I was surprised and pleased by some of her toughness along the way, but I think the disadvantage [she faced] is not having a deep experience and knowledge of the immigration issue," said Roy Beck, president of NumbersUSA, a grass-roots organization that favors reducing immigration.

One of the complaints against Nielsen was that she didn't fully vet creative ideas to address the migrant crisis that filtered up through DHS from officials who had more direct experience of the problem.

Beck called former Kansas Secretary of State Kris Kobach "the benchmark" for the position and said he had pushed for his nomination, while acknowledging it could be a tough confirmation battle.

Beck, however, said he did not favor a return to the discarded 2018 policy of not leaving decisions about whether families should be allowed to stay together with migrant parents.

Instead, he favors a return to having border patrol agents involved in adjudication proceedings for illegal migrants, which could help reduce the backlog of immigration cases.

Alfonso Aguilar, president of the Latino Partnership for Conservative Principles, warned that the president or his staunchest allies in the immigration debate shouldn't expect a sea change as a result of replacing Nielsen.

"It would be disingenuous to think that just by replacing the head of DHS things are going to improve," he said. "What we're seeing at the border, this dramatic surge, it's a product of many factors, of economic and political factors in the countries of [the migrants'] origins that we have little control over.

"I thought Nielsen was doing a good job," he added. "You can replace her with somebody else, but it's still the same problem. I don't know what you could do differently."