Mitt Romney’s Republican presidential rivals attempted to plant new doubts about his conservatism and his character during a debate here on Monday, putting the front-runner on the defensive — and unnerving him at moments — even as polls suggest he is in a position to win a crucial contest on Saturday.

Aware that only five days remained before a South Carolina primary that could clear Romney’s path to the nomination, his four opponents offered some of their most strident rhetoric of the campaign.

Texas Gov. Rick Perry, when asked about the Justice Department’s rejection of South Carolina’s voter-identification law on the grounds that it discriminates against minority voters, said: “South Carolina is at war with this federal government and with this administration.” His comments brought cheers from the conservative audience, which was sitting in the Myrtle Beach Convention Center, about 100 miles from the spot where the first shots of the Civil War were fired more than 150 years ago.

When former House speaker Newt Gingrich (Ga.) was asked how long unemployment benefits should last, he replied that all such payments should be linked to job training and issued a broadside at President Obama, who has fought to have such benefits extended.

“Unconditional efforts by the best food-stamp president in American history to maximize dependency is terrible for the future of this country,” Gingrich said. “Every American of every background has been endowed by their creator with the right to pursue happiness. And if that makes liberals unhappy, I’m going to continue to find ways to help poor people learn how to get a job.” That comment brought a standing ovation.

Gingrich and Perry continued their criticism of Romney as having a record as a corporate turnaround artist — despite the fact that this line of argument against the likely nominee has made other Republicans fear that they may be giving the Democrats ammunition.

“There was a pattern in some companies, a handful of them, of leaving them with enormous debt and then within a year or two or three having them go broke,” Gingrich said. “I think that is something he ought to answer.”

Perry added: “I visited Georgetown, South Carolina. It was one of those towns where there was a steel mill that [Romney’s firm Bain Capital] swept in, they picked that company over and a lot of people lost jobs there.”

Romney responded that he is proud of his record.

“I think if people want to have someone who understands how the economy works, having worked in the real economy, then I’m the guy that can best post up against Barack Obama,” he said.

He also recast his job-creation efforts at Bain, focusing on the firm’s biggest successes rather than the sum of its deals. Romney previously had said he helped create more than 100,000 net jobs, but on Monday he highlighted four businesses that his company helped start that he said have since accounted for 120,000 new positions.

Romney, however, was caught off balance at several points. After so many debates, his opponents have learned the types of challenges that will rattle him.

For instance, he bristled as Perry and then one of the moderators asked why he had not released his tax returns.

Romney, who has estimated his net worth at $190 million to $250 million, did not reply until a moderator pressed him later, and he offered an unusually stammering response.

“I think I’ve heard enough from folks saying, “Look, you know, let’s see your tax records,’ ” Romney said. “I have nothing in them that suggests there’s any problem and I’m happy to do so. I sort of feel like we’re showing a lot of exposure at this point, and if I become our nominee and what’s happened in history is people have released them in about April of the coming year, and that’s probably what I’d do.”

Romney also appeared unprepared when former senator Rick Santorum (Pa.) turned the tables on the question of whether felons should be allowed to vote. An outside organization supporting Romney, known as a super PAC, has been running ads criticizing Santorum for his support of restoring that right to felons who have served their time.

“In the state of Massachusetts, when you were governor, the law was that not only could violent felons vote after they exhausted their sentences, but they could vote while they were on probation and parole, which was a more liberal position than I took,” Santorum said. “If in fact, you felt so passionately about this that you are now going to go out and have somebody criticize me for restoring voting rights to people who have — who have exhausted their sentence and served their time and paid their debt to society, then why didn’t you try to change that when you were governor of Massachusetts?”

Romney replied that he could not have had such legislation passed through a Democratic legislature.

The debate, sponsored by the Wall Street Journal and Fox News Channel, was the 16th of the primary season. At one point in September, as many as nine candidates were onstage. By Monday, with the decision by former Utah governor Jon Huntsman Jr. to abandon the race and endorse Romney, the field had narrowed to five.

For Romney’s four remaining rivals, Saturday’s primary in South Carolina could represent the last real chance to slow his momentum. Already, he has done what no other Republican presidential contender has by winning both the Iowa caucuses and the New Hampshire primary.

But his success stems in part from his superior organization and financial might. It also owes to the fact that none of his opponents has been able to coalesce the forces that oppose his candidacy.

The former Massachusetts governor has not won over many on the right, who mistrust his record, which includes past support for abortion rights and the passage of a health-care system in Massachusetts that closely resembles the new national health care-law that conservatives despise.

Gingrich, speaking to a gathering of the evangelical political organization Faith and Freedom Coalition shortly before the debate, acknowledged as much. And he warned: “Unless a conservative wins on Saturday, we’re going to end up with a moderate nominee who in my judgment will have a very, very hard time beating Barack Obama.”

South Carolina’s voters have picked the ultimate nominee in every presidential race since 1980, when the state first assumed its prominent early spot on the nominating calendar.

This year, however, there is a new dynamic: the potency of super PACs, which operate independently of the candidates’ campaigns but have been spending millions on negative advertising on their behalf.

Though Romney has been the biggest beneficiary of such groups, he expressed discomfort with their impact: “Candidates should have the responsibility and the right to manage the ads that are run on their behalf. I think this has to change.”

Several candidates were called to task for the negative tone their campaigns have taken in South Carolina. Asked whether he agreed with Huntsman’s call to cease airing attack ads, Rep. Ron Paul (Tex.) said he would not.

“If you’re exposing a voting record, I think it’s quite proper,” he said. “There was one ad that we used against Senator Santorum. . . . My only regret is that I couldn’t get enough in in that one minute that I should have.”