DALLAS — In their first head-to-head matchup of an increasingly contentious U.S. Senate campaign, Republican incumbent Ted Cruz and Democrat Beto O'Rourke clashed bitterly over issues ranging from gun rights to health care to immigration.

Cruz, a polished debater going back to his days at Princeton University, would likely be considered the winner on style as he went on offense often and enthusiastically as he tried to paint O'Rourke as out of step with Texas voters and Texas values, said SMU political communications professor Stephanie Martin.

But she noted that O'Rourke, animated and forceful in his own right, scored by exuding passion and likeability in his responses.

More:Ted Cruz and Beto O'Rourke debated Friday. Here's what happened.

"Cruz is an excellent debater, he showed that," said Martin, who watched the matchup in the same room where an estimated 140 reporters from Texas and across the country were huddled. "For O'Rourke, he was trying to show that he is a decent guy. To the extent he can make the race about that, he's got a shot."

The highly anticipated contests carried in most Texas media markets and on several livestreams that reach nationwide was study in both contrast and aggression from the first question to the final statements.

O'Rourke defended his statements that the children of undocumented immigrants, called Dreamers, who know only the United States as home should be put on the path to citizenship.

"We begin by freeing the Dreamers from the fear of deportation and making them citizens," O'Rourke said.

But Cruz, whose father was a legal immigrant from Cuba, fired back by summing up his immigration policy as "legal good; illegal bad."

"There is a right way and a wrong way to come into this country," he said. "You wait in line and you follow the rules."

O'Rourke accused Cruz of abdicating his role of standing up for Texans by being a too-compliant defender of President Donald Trump.

"Average Texans wonder where our junior senator is," O'Rourke said, referring to trade wars and tariffs promoted by Trump. "We need a U.S. senator who will stand up to this president, work with him when we can."

Cruz shot back with force, pointing out that he was among the first elected officials on the scene at such tragedies as the deadly mass shootings in Sutherland Springs, the fatal explosion at a fertilizer plant in the town of West and in the coastal regions devastated last year by Hurricane Harvey.

O'Rourke also pointed out that while running for president, Cruz missed scores of Senate votes. And when questioned about why he and Trump are now close allies even though the clashed bitterly during the 2016 nominating contest, Cruz pushed back.

"I made a conscious choice to do the job i was elected to do, and that is to represent 28 million Texans," he said, as he mentioned the Trump-backed tax cuts and low Texas unemployment rate. "I could have chosen to make it about myself ... my feelings are hurt so I'm going to take my marbles and go home.

"But I think that would have been not doing the job I was elected to."

O'Rourke criticized efforts by Cruz and other congressional Republicans for pushing to roll back the Affordable Care Act, especially the provision protecting coverage for pre-existing conditions. He noted that he met a child with severe disabilities who might not be able to find coverage if the law known as Obamacare is repealed.

"His life is worth just as much as anyone else's lives in this country," O'Rourke said.

Cruz used a question about whether the Dallas police officer who apparently shot an unarmed man in his own apartment should be fired, framed his response as an attack on O'Rourke's respect for law enforcement.

"I've been to too many police shootings," Cruz said.

O'Rourke countered with a personal story of his own, saying his uncle was a law enforcement officer "who taught me to shoot." But he was also animated while talking about the disproportion of African-Americans being shot by police.

He also defended his call to ban sales of assault-style rifles, saying they "belong on the battlefield, not in schools and churches" and adding "thoughts and prayers are simply not going to cut it anymore."

Cruz touted his own pro-gun rights bona fides, saying even survivors of mass shootings say "gun control is not the answer."

The candidates arrived in Dallas facing high stakes. Cruz got an early-week boost when a Quinnipiac University poll of likely Texas voters showed him opening comfortable nine-point lead after hammering O'Rourke for his support of the "take a knee" posture by some NFL players protesting racial injustice.

But the next day, an Ipsos online poll of likely voters done with Reuters and the University of Virginia showed the Democrat with a two-point edge, his first lead since polling began in what is considered to be Texas' first competitive U.S. Senate race since 2002.

The debate was staged at SMU's McFarlin Auditorium, which seats more than 2,000 people but the debate audience was limited to about 250. McFarlin is normally used as a performance and lecture hall but it also played host to the only speech ever delivered by Martin Luther King Jr, in Dallas.

His address, at the invitation of the SMU student body vice president, came during a time when Dallas remained heavily segregated and King's presence brought in a heavy police presence.

The student body president, Bert Moore, was studying theology and had traveled to Montgomery, Ala., to participate in a civil rights march with King, according to SMU archives.

Cruz, an unsuccessful candidate for the 2016 GOP presidential nomination seeking his second term in the Senate, has been campaigning like a newcomer for the past several weeks using town-hall formats and never turning down question from voters or requests for posed photos.

O'Rourke, who has spent as much time in the U.S. House as Cruz has in the Senate, has adopted something of a whirling-dervish approach in his bid to become the first Texas Democrat elected statewide in 24 years.

Since entering the race in March 2017, the El Paso congressman has visited all 254 Texas counties has outraised the incumbent by a near 2-1 margin. In fact, he has raised more money that any Democrat in the nation running for the Senate.

Political science Professor Brandon Rottinghaus of the University of Houston agreed that incumbent's debating experience paid off.

"Cruz’s experience with this format showed clearly and he was his usual polished self," Rottinghaus said. "There were flares of passion that were somewhat rehearsed, especially on his attention to the needs of Texans, but he diffused O’Rourke’s advantage on connecting to Texans."

O'Rourke, he said, sometimes played against the image he's crafted on the stump and in town hall settings.

"Beto showed some fire in most answers in contrast his rather laid back campaign style to date," Rottinghaus said. "He didn’t look as natural in this setting as in his campaign events but he landed a few blows to hurt Cruz."

The first of three debates was moderated by Dallas Morning News political reporter and NBC 5 political anchor Julie Fine.

The candidates face off next on Sept. 30 in Houston and on Oct. 16 in San Antonio, Each debate will be one hour long.

This is a developing story. Please check back for updates.

John C. Moritz covers Texas government and politics for the USA Today Network in Austin. Contact him at John.Moritz@caller.com and follow him on Twitter @JohnnieMo.

RELATED COVERAGE

More:Where Ted Cruz and Beto O'Rourke stand on the issues in Texas' US Senate race

More:Ted Cruz, Beto O'Rourke to debate three times before Texas' U.S. Senate election