WASHINGTON — President Donald Trump's policy of taking immigrant children from their parents at the southern border may have been designed to push Democrats to the negotiating table in Congress — but it could end up costing Republican lawmakers.

"Democrats can fix their forced family breakup at the Border by working with Republicans on new legislation, for a change!" Trump wrote on Twitter Saturday. "This is why we need more Republicans elected in November."

But the policy, which has separated some 2,000 children from their parents in just six weeks, could have the opposite effect as anxious Republican lawmakers fear voters may see their party as heartless on immigration and punish them for it in November. And Democrats are driving home that message in emails to supporters and by organizing trips to detention centers.

The issue will "absolutely" be a factor in the midterm elections this fall, said a GOP operative working to elect Republicans to Congress, adding that "the images are devastating" for the GOP.

Trump will speak to Republicans on Capitol Hill Tuesday about immigration, according to a Republicans leadership aide.

Trump tried a similar tactic last year related to the so-called Dreamers, revoking an executive order that granted them protections in an attempt to force Congress to pass legislation that included the border wall he ran on as a candidate.

But the effort backfired when federal courts stepped-in and restored the protections for the nearly 800,000 DACA recipients.

With the Dreamers taken care of — for now — Democrats no longer had any reason to meet Trump's demands. A similar scenario is playing out now in that Democrats have managed, despite Trump’s efforts, to place the blame for the border crisis squarely at his doorsetep.

Meanwhile, Republicans, struggling to defend a policy that tears families apart, are starting to bend.

House Speaker Paul Ryan said on Thursday he's not comfortable with children being separated from their families and he added that it "needs to be addressed" with legislation.

Rep. Mark Meadows, R-N.C., chairman of the conservative Freedom Caucus, said that he is "100 percent supportive of keeping families together."

Meadows added, "Most of my constituents are pro-family constituents who believe keeping a family unit together is always best."

A second Republican strategist said, "The media will broadcast these images of brutality and chaos and the public will associate them with the Republicans that run the House and the Senate — but most of all with President Trump."

But fearful of challenging the president, Republicans are offering a fix that also gives Trump what he wants: major reductions to legal immigration and billions of dollars for a border wall. And the measure makes it extremely difficult to obtain asylum, which is what most families crossing the border are seeking. Furthermore, some experts say that the measure does little to ensure that children will be kept with their parents.

And in the Senate, Sen. John Cornyn, R-Tex., plans to reintroduce legislation that would keep border-crossing families together "while they await court proceedings," according to an aide. It would be a new version of his 2014 Humane Act, which also expedites court proceedings for unaccompanied minor children. The legislation, critics say, would actually lead to more deportations of children and families.

House Democratic Leader Nancy Pelosi of California called Trump's tactics "shameful."

"He's using children, whether they're Dreamers or whether they're little children at the border now, for a political purpose," Pelosi said.

Democrats are organizing their supporters around the issue. Sen. Tammy Baldwin, D-Wisc., who is up for re-election in 2018, sent an email to supporters asking them to sign a petition to stop the "callous, unconscionable, and downright un-American" actions at the border by the administration.

A group of House Democrats of the Congressional Hispanic Caucus and Pelosi are traveling to the border on Monday to raise attention to the issue.

Democrats insist legislation is not necessary because the actions at the border are the administration's prerogative, not something required by law, as Trump has claimed. But they have united behind the Keep Families Together Act, that says the government is "prohibited" from separating families at the border unless the child is being abused or is being trafficked. Thirty-nine Democrats in the Senate have signed onto the measure in the Senate and a companion version supported by Democrats in the House.

"This is really about our values as a country. It's who we are as a country," Sen. Dianne Feinstein, D-Calif., said. "And we're here to say this is just simply wrong and we've got to put an end to the taking of minor children from their parents at the border."