Candidates in both parties who are running in tight races want to weaponize the policy of separating child migrants from their parents at the U.S-Mexico border.

In Texas’ Senate race, Democratic Rep. Beto O’Rourke, whose district includes El Paso, staged a march to the border crossing in Tornillo, where children of migrant families from Central America are being held. He was joined by Texas' Democratic candidate for governor Lupe Valdez.

O'Rourke previously visited a detention facility in McAllen.

“What's happening right now, it’s on us, all of us — no person, no party, no administration however powerful. It’s on all of us, the people of America,” O’Rourke said in an email to his supporters.

O’Rourke is challenging incumbent Sen. Ted Cruz, who late Monday announced legislation to keep immigrant families together and guarantee review of their cases within 72 hours.

Watch: Talk of Policy Separating Families Envelops Hill

“Children belong with their mothers and fathers,” Cruz said in a statement announcing his legislation. “Once their cases have been adjudicated — under my legislation, in no longer than 14 days — those who meet the legal standard should be granted asylum and those who don’t should be immediately returned to their home country.

“When you see reporters, when you see Democrats saying, ‘Don’t separate kids from their parents,’ what they’re really saying is ‘Don’t arrest illegal aliens,” he said at the Texas Republican convention on Saturday, according to the Dallas Morning News.

Cruz’s campaign office referred questions about his legislation to his Senate office. When asked whether Cruz had changed his position since Saturday, Cruz’s Senate office said it would have a comment when the text of his legislation was released.

The issue has become another divisive one on in battleground races that will determine who controls Congress after the midterm elections.

Conservative opinion makers were warning the policy could backfire on Republicans, with the Wall Street Journal worrying that Republicans risk losing the midterms because of the policy.

Similarly, Rep. Steve Stivers, who runs the National Republican Congressional Campaign, wrote in a Facebook post that he would send a letter to the Trump administration to stop the policy.

“If the policy is not changed, I will support other means to stop unnecessary separation of children from their parents,” Stivers wrote.

Florida Republican Gov. Rick Scott, who is running against Democratic Sen. Bill Nelson, broke with the Trump administration’s policy, saying “Let me be clear — I do not favor separating families. Washington is to blame for this by being all talk and no action, and the solution is to secure the border," he said, according to the South Florida Sun-Sentinel.

But Scott still said there were clear parameters on immigration and did not directly criticize President Donald Trump, who has implemented the zer0-tolerance immigration policy.

“Anyone seeking to enter our country illegally needs to be sent back, with the exception of those who are truly seeking asylum from an oppressive regime,” he said.

Nelson, for his part, co-sponsored legislation with every other Democrat led by Sen. Dianne Feinstein to end family separation.

West Virginia Attorney General Patrick Morrisey attacked Sen. Joe Manchin for “joining with liberals in Washington to reinstate the dangerous catch and release, open-border policies of Barack Obama and Hillary Clinton.”

Missouri AG Josh Hawley who is running against Sen. Claire McCaskill — accused the incumbent of letting criminals use children as human shields to prevent enforcement.

Rep. Lou Barletta of Pennsylvania said his opponent, Sen. Bob Casey is a “supporter of this dangerous open border policy.”

And in North Dakota, GOP Rep. Kevin Cramer, who is challenging Democratic Sen. Heidi Heitkamp, is all-in on the president’s policy.

“I think there’s a lot of over-dramatization, if you want to know the truth, but I would say this: North Dakotans are most concerned about safety and security at our borders,” Cramer told the Gray Television Network.

Heitkamp is a co-sponsor of the Feinstein bill and while she said there should be consequences for those who come into the country illegally, “We need tough, smart immigration and border security strategies to keep Americans safe, not inhumane political decisions,” she wrote in a Facebook post.

Some Democrats like O’Rourke are hoping to play offense.

Matt Haggman, who is running in the Democratic primary for Florida's open 27th District called for closing U.S. Immigration and Customs Enforcement.

Haggman also took a shot at Donna Shalala, the former Clinton administration Health and Human Services secretary who is considered the frontrunner in the Democratic primary.

Similarly, liberal group Equity Forward released polling on the policy in three Republican-held districts that voted for Hillary Clinton in 2016 that their hoping to tip in November.

The poll conducted by Global Strategy Group found that 56 percent of voters in Florida’s 26th District, held by Rep. Carlos Curbelo, “strongly oppose” the policy.

In New Jersey’s 7th District, held by Rep. Leonard Lance, 61 percent of voters said they opposed the separation policy with 50 percent strongly opposed to it.

In Texas’ 7th District, held by Rep. John Culberson, the poll found 60 percent of voters opposed the separation policy while 52 strongly opposed it.

But some Republicans hope to flip the policy on Democrats. In Connecticut's 5th District, Ruby Corby O’Neill is running to replace outgoing Democratic Rep. Elizabeth Esty.

In one press release, O’Neill criticized Democrats for “fake outrage” and using children as "political pawns."

Despite Inside Elections rating the race Solid Democratic, Republicans said they would target the seat after Esty announced she would not seek re-election.

“President Trump is enforcing existing law and if Democrats really cared about the children they would stop staging publicity stunts and start working with Republicans to fix the problem," O’Neill said.

— Niels Lesniewski contributed to this report.Get breaking news alerts and more from Roll Call on your iPhone or your Android.