STRATHAM, N.H. — Rick Perry had just wrapped up his Saturday morning speech to a crowd of Republican activists when one approached him for a chat.

"I missed you two years ago when you were here!" the man told the Texas governor.

So did a lot of Republicans. After barely registering a blip on the radar here in the all-important primary state in 2012, the former and perhaps future GOP presidential candidate returned for the first time, looking for a fresh start in a state he will find very challenging if he runs again.

As Perry weighs a second run for president, the scope of his rebuilding project came into sharp focus during his two-day swing through the Granite State, where crowds were friendly and upbeat but cognizant of his disastrous 2012 bid. Those same Republican activists, voters and donors are also being wooed by a blue chip roster of other potential White House hopefuls who don't have the baggage Perry is carrying.

"You can't argue that last time around, he wasn't well-known enough or wasn't adequately financed," said Fergus Cullen, a former New Hampshire Republican Party chairman. "He just proved to be not a good candidate."

Alfonso Webb, 74, who attended Perry's speech here, recalled the governor being "a little unsure of himself with his presentation" in 2012. "He has to start on time this time," said Webb, who sees some improvement these days.

Perry wants to be more than on time. So he's showing up early and promising to return ahead of the midterm elections to rally support for Republican candidates,  a proven way to build inroads.

The governor, who is stepping down at the end of his current term, spent Friday and Saturday attending six events. He chatted with business leaders in Portsmouth, posed for photos at a picnic in Chichester and encouraged Republican activists in Nashua to cast ballots in the midterms.

But Perry's far from the only Republican laying groundwork here. Sens. Ted Cruz (Tex.) and Rand Paul (Ky.) have each made several visits. New Jersey Gov. Chris Christie (R) and Louisiana Gov. Bobby Jindal (R) have also made the trip. So has Sen. Marco Rubio (Fla.). All placed ahead of Perry in a WMUR poll released in July.

Perry has hired Mike Dennehy, a veteran Republican consultant in the state, to steer his outreach. Dennehy shadowed Perry as he barnstormed the state, happily snapping pictures for eager supporters.

After launching a campaign in August 2011 to sky-high expectations, Perry's decline was as steep as his ascent. He famously drew a blank during a Michigan debate, unable to name the third government agency he wanted to ax. Back pain plagued him. In New Hampshire, where he spent little time campaigning, Perry won less than 1 percent in the primary.

"I think that left a lot of heavy residue on his identity with the overall primary voter," said Rich Killion, a veteran Republican strategist, of Perry's 2012 campaign.

Perry acknowledged running a lousy campaign. While he said he has not decided about 2016, he sounded like a candidate-in-waiting who is trying to dust off the dirt of 2012.

"I learned some really, really, good, humbling and frustrating lessons running for the presidency," Perry told reporters Friday.

For Perry, finding a core message and identity that resonates with Republicans here will be crucial, should he run for president again. The governor has zeroed in on national security, adopting a very hawkish tone and tying together the problems on the U.S.-Mexico border and the threat posed by extremist Islamist militants in Iraq.

Perry hit on that theme Saturday in Rochester, the hometown of James Foley, the photojournalist who was beheaded by the Islamic State militant group last week.  At a "Defend Freedom" pig roast hosted by Concerned Veterans for America, a group backed the billionaire industrialist Koch brothers, Perry paid tribute to Foley and called for the U.S. to take decisive military action in Iraq against extremists fighting to seize power.

"They are now stronger than al-Qaeda ever was," said the governor, who donned a black polo emblazoned with "Wounded Warrior Project." "We've come to one of those moments in history where American action will be decisive and inaction will be consequential."

With the smell of pork and baked beans filling the afternoon air, Perry, as he did throughout his visit, warned of the dangers of refusing to intensify efforts to secure the "porous" Southern border of the U.S. He reiterated his concern that Islamist militants could be using the border to enter the United States.

"We don't know in every instance who is entering our country or where they came from," Perry said.

Paul, a libertarian-leaning Republican, has already clashed with Perry's call for greater U.S. intervention abroad. If both run for president, the divide is sure to flare up.

Legal woes have given Perry an unexpected boost with Republican activists in New Hampshire and around the country. He has been indicted on felony charges over his veto of funding to an anti-corruption unit after a Democratic district attorney arrested for drunk driving refused to resign. Both prominent Republicans and local activists have rallied to Perry's side, seeing the charges as politically motivated.

"If the Hillary Clintons of the world don't condemn it, they're disqualified from being chief executives," former governor John H. Sununu (R) said of the charges Saturday.

The crowd here ate it up.