Republican presidential candidates sparred over experience, took jabs at their Democratic opponents and even shared a few laughs during CNBC's main debate in Boulder, Colo., on Oct. 28. (Sarah Parnass/The Washington Post)

The leading Republican candidates for president tangled with the moderators and one another in a freewheeling and chaotic debate here Wednesday night that swerved from one topic to another but featured a handful of notably sharp exchanges and breakout performances.

Sen. Marco Rubio was one of the dominant figures, getting the better of his onetime mentor, Jeb Bush, in deflecting an attack over Rubio’s missed votes in the Senate. Rubio (Fla.) also warded off questions about his family’s financial struggles by saying he did not “inherit” money from his family and can empathize with working- and middle-class Americans.

The media also became a punching bag during the tense, two-hour debate, which saw candidates shout over one another and the moderators struggle to quiet them. The White House aspirants lashed out at CNBC’s moderators for their confrontational line of questioning about contradictions in their past statements or personal backgrounds.

Sen. Ted Cruz (Tex.) drew one of the loudest bursts of applause from the live audience here when he said: “This is not a cage match. You look at the questions: ‘Donald Trump, are you a comic-book villain?’ ‘Ben Carson, can you do math?’ ‘John Kasich, will you insult two people over here?’ ‘Marco Rubio, why don’t you resign?’ ‘Jeb Bush, why have your numbers fallen?’ ”

When Bush was asked about the intersection of fantasy sports and regulated gambling, New Jersey Gov. Chris Christie jumped in.

During the third GOP debate, candidates got feisty with the CNBC moderators. They took aim at the questions asked, at the "mainstream media" and at the moderators interrupting their answers. (Victoria M. Walker/The Washington Post)

“Wait a second,” Christie said. “We have $19 trillion in debt, we have people out of work, we have ISIS and al-Qaeda attacking us, and we’re talking about fantasy football?”

Within minutes of the candidates delivering their closing statements, Reince Priebus, the chairman of the Republican National Committee, which oversees and sanctions the forums, issued a tweet: “CNBC should be ashamed of how this debate was handled.”

Meanwhile, the two political outsiders who hold commanding polling leads — businessman Donald Trump and retired surgeon Ben Carson — were absent through long stretches of the debate. When they did speak, they often found themselves on the defensive — Trump over his real estate company’s bankruptcies, Carson on his corporate board work, and both on the feasibility of their tax plans.

“You know, these plans would put us trillions and trillions of dollars in debt,” Ohio Gov. John Kasich said. “. . . Why don’t we just give a chicken in every pot, while we’re, you know, coming up with these fantasy tax schemes?”

Trump snapped back at Kasich: “He was such a nice guy. And he said, ‘Oh, I’m never going to attack.’ But then his poll numbers tanked . . . that is why he is on the end [of the debate stage] — and he got nasty.”

The debate, held on the University of Colorado’s scenic Boulder campus and aired on CNBC, a business-news cable channel, came at a moment of fresh urgency for the Republican field. With only 95 days until the Iowa caucuses that kick off the nominating contest, many candidates such as Kasich and Christie who have languished in the polls are reaching a point of desperation to create momentum for their candidacies.

It also was a high-pressure moment for Bush, the early favorite of the party establishment and donor class, who is struggling to breathe new life into his struggling campaign. But he missed some clear opportunities on Wednesday night. During an early discussion on taxes and fiscal policy, which is in Bush’s wheelhouse, he was silent as Trump, Kasich and other candidates sparred over their plans.

10 charts explain the third GOP debate

Bush launched an attack on Rubio, who was standing a few feet to his left, by accusing him of skipping out on his Senate job by missing votes to be on the presidential campaign trail.

Noting that he is one of Rubio’s Florida constituents, Bush said: “The Senate — what is it, like a French workweek? You get, like, three days where you have to show up? You can campaign, or just resign and let someone else take the job.”

Rubio was ready with a retort. He noted that Bush is trying to launch “a furious comeback” modeled after Sen. John McCain’s come-from-behind win in 2008, but that McCain (Ariz.) missed many votes while campaigning.

“I don’t remember you ever complaining about John McCain’s vote record,” Rubio said. “The only reason why you’re doing it now is because we’re running for the same position, and someone has convinced you that attacking me is going to help you. . . . My campaign is going to be about the future of America. It’s not going to be about attacking anyone else on this stage.”

Later, Bush had an awkward moment when he joked that he would give “a warm kiss” to any Democrat who supports cutting taxes. The remark drew mockery on social media.

Rubio came under fire when co-moderator Becky Quick asked him about what she described as poor bookkeeping skills, including facing foreclosure on a second home he bought and liquidating a $60,000 retirement account.

Rubio responded by accusing Quick of parroting attacks of his political opponents, and then recounted his personal story as the son of a bartender and a maid who grew up poor.

“I’m not worried about my finances,” Rubio said. “I’m worried about the finances of everyday Americans.”

Other candidates tried to make heartfelt appeals to the kind of middle-class voters who will be key in the general election. Former Arkansas governor Mike Huckabee lamented stagnant wages and the growing divide between the wealthiest people in corporate America and ordinary working families. Christie stared directly into the camera as he told voters that the government had let them down. And Cruz rattled off statistics illustrating how life has become much more difficult for single mothers, whose median wages have been declining.

Social Security and other entitlement programs were an area of disagreement for some of the candidates, illustrating the divide within the Republican Party about whether or how to reform the programs.

Huckabee said: “This is a matter not of math; this is a matter of morality. If this country does not keep its promise to seniors, then what promise can this country hope to be trusted to keep?”

But Christie warned that Social Security would become “insolvent” in short order unless major changes are made. “It’s not there anymore. The government stole it and spent it,” Christie said of Social Security funds. “All that’s in that trust fund is a pile of IOUs for money they spent on something else a long time ago.”

Carly Fiorina, the former Hewlett-Packard chief executive who earned wide notice in the first two debates, found herself repeatedly fighting to even get into the conversation. She was put on the defensive for her controversial firing at the technology company, but an answer of hers about taxes was well received.

“You know, every election we hear a lot of talk,” she said. “. . . But somehow for decades, nothing really has changed. What we need now is a proven leader who has produced results.”

By the night’s end, the candidates were effectively tripping over themselves to go after the moderators. One of Trump’s strongest moments came when he said he had teamed up with Carson to force CNBC to shorten the debate to two hours. He accused the network of trying to milk the debate for ad revenue to the tune of $250,000 for a 30-second spot. Co-moderator John Harwood denied Trump’s assertion, but Trump insisted it was proof of his fundamental promise to voters: Nobody would be better at getting a good deal than him.

“Everybody said it was going to be three hours, three and a half, including them, and in about two minutes I renegotiated it so we can get the hell out of here,” Trump said to applause. “Not bad. And, I’ll do that with the country.”

As the candidates rushed into the spin room to slam CNBC, a third co-moderator, Carl Quintanilla, took to Twitter to let off some steam: “I’ll say this much: everyone should moderate a debate, once. It’s like yelling at the TV from home, except they talk back.”

David A. Fahrenthold in Washington contributed to this report.