DALLAS (Reuters) - U.S. Senator Ted Cruz, trying furiously to beat back a high-profile challenge from Democratic rival Beto O’Rourke, repeatedly accused his opponent of being out of step with the Texas electorate as the two candidates faced off in a debate just six weeks before critical congressional elections.

Slideshow ( 4 images )

At Southern Methodist University in Dallas, the two battled over hot-button issues such as immigration, gun rights and trade. O’Rourke frequently complained that Cruz was misrepresenting his positions -- at one point accusing the incumbent Republican of “slander.”

The candidates sparred as well over the embattled Supreme Court nomination of Brett Kavanaugh, who faces allegations that he assaulted a woman, Christine Blasey Ford, while both were in high school.

Cruz urged Ford to testify before the Senate Judiciary Committee, of which Cruz is a member, next week. “The allegations she has raised are serious, and they deserve to be treated with respect,” Cruz said. “Judge Kavanaugh deserves a full opportunity to defend himself,” he added.

O’Rourke, a U.S. representative from El Paso, called for the FBI to investigate Ford’s claims, something that Senate Republicans have resisted, and argued that Kavanaugh’s nomination should be rejected.

Cruz painted O’Rourke, who favors a path to citizenship for illegal immigrants, opposes building a wall along the border with Mexico, and supports some gun-control measures, as too radical for Texas. He noted that O’Rourke has expressed an openness toward abolishing the U.S. Immigration and Customs Enforcement Agency and impeaching President Donald Trump.

O’Rourke in turn blasted Cruz for supporting massive deportations of illegal immigrants. “Imagine the cost,” O’Rourke said. “Imagine the stain on our conscience.”

He also slammed Cruz for supporting Trump’s trade policies, which he said have negatively impacted the Texas economy. The state “needs a senator who will work with the president where we can and stand up to him where we must,” O’Rourke said.

Following the debate, O’Rourke told reporters that Cruz “has a tendency to mischaracterize a position” and was making him appear more politically more radical than he is.

Asked to respond, Cruz spokeswoman Emily Miller said the debate was the first time O’Rourke “has been directly confronted with his policies.”

Cruz, who is seeking a second term in the Senate, did not address the media after the debate. The two candidates will square off twice more before election day.

The Nov. 6 elections will determine whether Republicans will retain control of both the Senate and the House of Representatives. Democrats need to win a net total of two additional seats to take the Senate and 23 to assume the majority in the House.

If Democrats win control of either chamber, much of Trump’s agenda would be stymied and his administration would be subjected to greater scrutiny.

O’Rourke’s candidacy was once viewed as the longest of long shots. Texas has not elected a Democrat to the Senate since 1988. But O’Rourke has focused heavily on courting women, Latinos and young voters, has developed a strong following on social media, and has proven to be a fund-raising dynamo, outpacing Cruz’s efforts.

A recent Reuters/Ipsos poll gave O’Rourke a slight edge, with 47 percent to Cruz’s 45 percent That came on the heels of a Quinnipiac University survey that showed Cruz up by 9 percentage points.