Democrat Beto O'Rourke abandoned his usual message of unity and optimism on Tuesday and laid into Ted Cruz, hoping to reverse polls that show him fading against the Republican incumbent during the second debate of a Texas Senate race that's become one of the nation's most closely watched.

During the opening moments, Cruz criticized O'Rourke for past votes supporting a never-enacted oil production tax that might have hit oil-rich Texas hard. O'Rourke responded by evoking a moniker Donald Trump bestowed on Cruz when the pair were bitter rivals during the 2016 Republican presidential primary, saying, "Senator Cruz is not going to be honest with you" and "it's why the president called him Lyin' Ted and its why the nickname stuck."

A former Ivy League debate champion, Cruz shot back, "It's clear Mr. O'Rourke's pollsters have told him to come out on the attack."

The pair clashed on abortion regulations, the nomination of Brett Kavanaugh to the Supreme Court and a border wall backed by the Trump administration.

When O'Rourke said he wanted to expand federally funded health care to more Americans, Cruz said that would mean socialized medicine that would cost trillions and require sky-high tax increases. O'Rourke said Cruz hadn't done enough to stand up to Trump when it came to Russia and that the state needs a "full-time senator" rather than someone who concentrates on running for president.

Even when Cruz tried to say that he and O'Rourke were somewhat in agreement on opposing the Trump administration's tariffs on foreign-made goods, O'Rourke drew laughs by replying, "Really interesting to hear you talk about the partisan circus after your six years in the Senate," a reference to Cruz's days as a tea party insurgent who battled the President Barack Obama at every turn.

He also noted that his monster fundraising has come without accepting donations from outside political groups, but Cruz said O'Rourke still "goes with the left-wing national activists and left-wing national donors."

In response to a question about the #MeToo movement, O'Rourke said Cruz "inexplicably" voted against the Violence Against Women Act, saying the senator was "all talk and no action." Cruz said people of both sexes need to be protected from harassment and abuse, adding "we need to protect everyone's rights."

Below are more topics discussed during the debate:

Should there be regulations on social media to protect voters from misinformation?

Should we prepare for changes to abortion laws?

Is climate change a problem?

Border security

Who pays for health care?

Tariffs and trade war

How to support hurricane survivors

Voting for the tax cut and America’s deficit

How can we bring back respect to politics?

#MeToo movement

Outside of politics

Closing statements