In recent weeks, the race between U.S. Sen. Ted Cruz, R-Texas, and U.S. Rep. Beto O’Rourke, D-El Paso, has largely revolved around immigration, playing out in detention centers along the southern border and over immigration bills in Washington.

But U.S. Supreme Court Justice Anthony Kennedy’s abrupt retirement announcement Wednesday sent shockwaves throughout the country — and quickly turned the two Texans’ attention to the nation’s highest court.

“After today, this race to represent Texas in the Senate matters more than ever,” O’Rourke wrote on Twitter Wednesday.

“Fully agree,” Cruz replied Thursday in his own tweet. “And the overwhelming majority of Texans want Supreme Court Justices who will preserve the Constitution & Bill of Rights, not undermine our rights and legislate from the bench.”

The power of consent for Supreme Court nominees is one of the Senate’s greatest powers, and now — after a controversial change to Senate rules last year — the chamber's Republicans have the numbers to potentially confirm a nominee over unified opposition from Democrats.

For Republicans, the Supreme Court vacancy represents an opportunity. For Democrats, it has inspired fear. And for the U.S. Senate race in Texas, it has already become a rallying cry.

The Texas Republican Party opened its latest fundraising email Friday morning with a call for donations to Cruz in light of the court vacancy. A day earlier, Cruz’s campaign sent out its own pitch to supporters for funds to ensure Republicans retain their Senate majority.

“If we lose the Senate, we will lose the opportunity to approve the nominations of strong Constitutionalists to the Supreme Court and other important positions. This is why we need your support. These are the stakes,” the Cruz campaign email reads.

Though some Democrats have demanded the Senate postpone the vote until after the November election — pointing to Senate Majority Leader Mitch McConnell’s move to do just that in 2016 — McConnell has pledged to hold a confirmation vote ahead of the midterms. U.S. Sen. John Cornyn, R-Texas, said the vote will likely happen in September.

Republicans are banking on the Supreme Court vacancy to turn out far-right voters who see it as an opportunity to push a conservative agenda through the courts.

“I think it actually energizes the Republican base, it makes people feel united,” Republican strategist Brendan Steinhauser said. “People seem to be very fired up. It seems very positive for Cruz.”

Cruz told Fox News Thursday he thought 2016 was a litmus test of the Supreme Court’s importance to voters, suggesting that the death of Supreme Court Justice Antonin Scalia — which set off a more than year-long showdown in the Senate over Scalia’s successor — helped propel Donald Trump to victory.

“This was a major issue the American people decided,” he said. “It was a major reason that we have President Trump and we have a Republican majority in the Senate — because the American people want justices who will defend the Constitution, will defend the Bill of Rights.”

Cruz, who clerked for former Chief Justice William Rehnquist after graduating from Harvard Law School and later argued before the U.S. Supreme Court nine times, said on Fox that filling Kennedy’s seat “could prove to be the most significant thing the Republican Senate does.” He has begun promoting a handful of candidates for the job, including U.S. Sen. Mike Lee, R-Utah.

Cruz’s campaign did not respond to requests for comment.

If Republicans succeed in their plans to vote Trump’s nominee onto the court before November, O’Rourke has little chance of swaying the outcome of this confirmation process. In an interview Thursday, he distanced himself from Democratic leaders who are calling for delaying the vote.

“I don’t know that you want to set an arbitrary timeline on this. I just think, you know, the President should nominate and the Senate should do its due diligence,” he said. “My understanding is historically that would take you past the November election anyhow if the Senate were truly to do its due diligence.”

Instead, O’Rourke’s campaign is focusing on the importance of Democrats retaking the Senate and regaining control of the confirmation process for future nominees.

“The choice is clear: we can either have Ted Cruz or Beto in the Senate voting on Supreme Court nominees,” the O'Rourke campaign’s fundraising email said. “Someone who will vote for the agenda of special interests and corporations or someone who will vote for the people of Texas. We need to work every single day to cut Cruz's narrow lead and ensure it's Beto.”

O'Rourke campaign spokesman Chris Evans said the campaign will emphasize what O’Rourke would look for in a nominee down the line — namely, someone who supports civil rights, abortion rights, access to healthcare and ending partisan gerrymandering.

O’Rourke said he still doesn’t know where the Supreme Court ranks among issues on voters’ minds, so he will take their temperature at town halls across Texas in the coming week, starting with one Friday afternoon in San Antonio.

“We’ll see if these issues come up at the town halls. I’m assuming they will, but we’ll see,” he said.

On both sides, abortion may emerge as a particular flashpoint. The Supreme Court vacancy casts doubt on the future of the landmark 1973 case Roe v. Wade, which declared abortion a constitutional right. Kennedy cast several decisive votes to protect abortion rights over the course of his career, and a more conservative justice could spell the end of those protections.

The extent to which hopes and fears of repealing Roe v. Wade will translate into votes in November remains an open question, said former state Sen. Wendy Davis, whose famous filibuster of an anti-abortion bill in the Texas Senate in 2013 boosted her national profile, leading to a failed run for governor a year later.

“It depends on how many people make choice a central part of why they vote. Those who are opposed to abortion most certainly do. But many supporters continue to take for granted that they will always be able to access abortion,” she wrote in an email. “Will this recent development...be enough to motivate independent suburban women to vote with protecting abortion access in mind? Hard to say. But I certainly hope so.”

Anti-abortion activists in Texas and around the country are already seizing on Kennedy’s retirement as an opportunity to take aim at Roe v. Wade. During most election cycles, Texas Right to Life typically spends more on state legislature races than congressional ones, said legislative director John Seago. But Kennedy’s retirement will likely prompt the group to boost its intended advertising for Cruz. He predicted other groups opposed to abortion will do the same in the months to come.

“In his race with O’Rourke, the Kennedy retirement is just going to electrify the race even more,” he said.

O’Rourke, who has so far outraised Cruz, has pledged not to accept PAC money — so abortion rights groups like the Planned Parenthood Action Fund can’t donate to his campaign directly.

But Yvonne Gutierrez, executive director of Planned Parenthood Texas Votes, said in a statement that the group will “lead grassroots efforts” across the state to mobilize voters.

"The Supreme Court vacancy poses a real and immediate threat to women in Texas, a state where access to safe, legal abortion is already on the line. It is critical that Texans – especially Texas women –make their voices heard in November by electing leaders who are committed to protecting women's health and rights,” Gutierrez wrote.