Texas Gov. Rick Perry has a reputation for running aggressive campaigns designed to keep the focus on his opponents rather than himself. In his opening debate as a presidential candidate, he followed that script from start to finish.

Midway through Wednesday’s forum at the Ronald Reagan Presidential Library, Perry joked, “I kind of feel like a piñata here at the party.” It was an acknowledgement that as the new leader in the polls for the GOP nomination, Perry drew more attacks and more critical questions than any of the other candidates.

But he did as much to stick his rivals as they did to him. He went after the other candidates with relish, whether in response to their criticisms or preemptively. He stood by some of his most controversial statements, including his view that Social Security is a “monstrosity.” At other times, he slipped past questions calling into question his record in Texas.

Many of his exchanges were with former Massachusetts governor Mitt Romney, the erstwhile front-runner for the GOP nomination until Perry got into the race last month. That produced a Romney who was more animated than in the first three debates, creating the impression that, for now, the Perry vs. Romney dynamic is the dominant theme of the Republican nomination contest.

Polls have shown that Perry and Romney are well ahead of any of the others in the race. But it took Wednesday’s debate — preceded by questions about Perry’s staying power and preparation for a national race, and about Romney’s ability to respond to a serious Republican rival — to demonstrate that both candidates are ready to battle it out for the foreseeable future.

The other candidates will have to muscle their way into the conversation, and several tried. But visually, the organizers from NBC and Politico set the stage in a way that emphasized the narrowing of the Republican race in the last few weeks. Perry and Romney stood next to one another at the center of the stage, with Rep. Michele Bachmann (R-Minn.) on Romney’s right and Rep. Ron Paul (R-Tex.) on Perry’s left.

The focus throughout the evening was on Perry, who was still untested as a national candidate. One of the most revealing moments came when he was asked about his belief, expressed in his 2010 book, “Fed Up!,” that Social Security was a failure and a giant “Ponzi scheme.”

Rather than back away or soften his comments, as some candidates might have done, the Texas governor didn’t flinch over his conclusions, even when it was pointed out that former vice president Dick Cheney and Karl Rove, former White House senior adviser in the George W. Bush administration, had criticized him for such language. He dismissed Rove, who was also an adviser to Perry earlier in his career, and said he disagreed with Cheney.

“I don’t care what anyone says,” he responded, arguing that the system is in such shaky financial shape that young workers cannot count on its benefits. “We know that, the American people know that, but, more importantly, those 25- and 30-year-olds know that.”

Romney saw an opening and took it. He sharply criticized Perry for calling Social Security a failure. That, he argued, is a recipe for trouble: “Our nominee has to be someone who isn’t committed to abolishing Social Security but who is committed to saving Social Security.”

Asked to respond, Perry said: “You cannot keep the status quo in place and not call it anything other than a Ponzi scheme. . . . That’s provocative language — maybe it’s time to have some provocative language in this country.”

That alone said much about the kind of candidate Perry intends to be: a conservative aiming to consolidate support in a Republican Party that has moved to the right in the years since Barack Obama was elected. And it showed the path that Romney might seek to follow as he tries to battle back, which is to persuade Republican voters who may question just how conservative he is that he is their best hope to win a general election.

At times, Perry showed some rougher edges. He offered a confusing answer about why roughly a quarter of Texas citizens are without health insurance, claiming that it is largely the fault of the federal government for not giving his state waivers to run the Medicaid program as it wishes. He called the president a “liar,” the kind of language that may excite the most passionate part of the Republican base but could cause him problems with swing voters in a general election.

For the other candidates, Wednesday was a long night. Bachmann performed well in her first debates and won the Ames Straw Poll in Iowa last month. But she has seen her campaign plummet rather than soar, and though she tried to reestablish herself, she was generally overshadowed in this forum.

Former Utah governor Jon Huntsman Jr., who is languishing in the low single digits, did what he could to put himself back into the debate. He pointed to his record in Utah on both the economy and health care and said it was superior to Perry’s in Texas or Romney’s in Massachusetts. He also claimed that he was more electable against Obama than his rivals. But his road ahead remains extremely difficult.

The other candidates played smaller roles. Former House speaker Newt Gingrich upbraided the questioners — NBC News anchor Brian Williams and Politico editor in chief John Harris — for trying to pit Republicans against one another, a tactic he used in last month’s Iowa debate.

Former Pennsylvania senator Rick Santorum challenged Perry on the Texas governor’s effort to vaccinate young girls against sexually transmitted disease, saying it was a misuse of government. Businessman Herman Cain tried to display his private-sector credentials.

Paul continued to show off his iconoclastic views, and he took a swipe at Perry along the way. That brought a sharp response from Perry, which caused a flurry of tweets from people who noted that it was surprising for someone leading in the polls to feel the need to attack a rival who is given little chance of winning the nomination. That was as good an example of the Perry style as anything in the debate.

There will be four more debates between now and mid-October. Perry passed his first test. Romney showed that he is not daunted by the Texas governor’s surge. The coming debates will help sort out their differences and give Republicans some real choices to consider as the primaries and caucuses near.

Read more on PostPolitics.com

Fact checking the GOP debate

The Reagan Library Republican debate: Winners and Losers

Interactive: GOP Debate analysis