WASHINGTON — Whether he means it to or not, the border crisis has been very good for Rick Perry.

The Texas governor and failed 2012 presidential candidate has been trying to re-emerge on the national stage as a serious contender for another presidential run. Brandishing glasses instead of cowboy boots, he's gone to great lengths to explain away his embarrassing performance during the 2012 election and had some serious early missteps, including having to walk back a comment where he compared homosexuality to alcoholism.

But the thousands of undocumented immigrants crossing into the United States in recent months, and Perry's perch as the top executive in Texas, have given him the opportunity to be out in front on an issue he knows well: the border.

Several people close to Perry insist his response to the border crisis involves no political calculation at all, and that he would be doing the exact same things were he not seriously toying with a 2016 run. A spokeswoman for Perry did not return a request for comment.

But, they add, it does give him the chance to change the subject from his "oops" moments and remind people why they thought he had a good shot before his 2012 dreams were derailed.

"It's a side of Rick Perry the national public really hasn't seen that a lot of us in Texas have," said Texas Rep. Michael McCaul, who chaired a Homeland Security field hearing on border crisis in Texas last week with Perry as lead witness. "It's one of his most passionate issues. He's not coming across strident; he wants to see D.C. work. He's solution-oriented."

One Republican operative close to Perry in Texas, who said he could not speak on the record, said that in a setting where Perry feels comfortable with an issue, "people love his ass."

"He's a lot smarter than he came across and sometimes comes across. Put him in that setting and he's a stud at it," the operative said. "He owns a small room and flops in front of the national camera."

That was on display when Perry took his spot in front of the dais — he was treated less as Republican boogeyman by the Democrats on the panel and more like an expert on the subject.

He called the members he knew well by their first names. Rep. Sheila Jackson Lee, not exactly known for her bipartisan rhetoric, thanked Perry and "all of you in here in the state of Texas who have risen to accept this challenge."

"Texas will stand in the very noble position … to continue some of the hard work you've already been engaged in," she said.

The only contentious moment came when Eric Swalwell, a freshman Democrat from the the San Francisco Bay Area, challenged Perry on the reasons for the influx of undocumented minors and Perry proceeded to chide him for doing so.

"There's been a lot of discussion about his debate performance and his back and all that. But he came across very articulate, intelligent, and thoughtful," McCaul said.

Not everyone was swayed by Perry's performance (and Jackson Lee, while kind to Perry, clearly was not supportive of Perry's stance that every child coming over should immediately be sent back home).

Rep. Joaquin Castro, a Texas Democrat from San Antonio, was less than impressed by Perry's performance at the hearing and with the governor in general.

"The border is a boogeyman for Rick Perry. And it's been helpful to try out that boogeyman the last several years around campaign time," Castro said. "He's running for president and so he's doing it again."

Perry met with President Obama this week (and greeted him on the tarmac on Dallas, though had initially threatened not to meet him upon his arrival in Austin) when Obama was in Texas for a pair of fundraisers. The two sat down with faith leaders and local officials to discuss the crisis at the border. Obama said on Wednesday night the two did not have philosophical differences on what needed to be done to address the crisis, and Obama urged Perry to pressure Texas Republicans in Congress to get behind his nearly $4 billion supplemental budget request.

Following the meeting, Perry released a statement blaming the border crisis on "bad public policy."

"Five hundred miles south of here in the Rio Grande Valley there is a humanitarian crisis unfolding that has been created by bad public policy, in particular the failure to secure the border," Perry said. "Securing the border is attainable, and the president needs to commit the resources necessary to get this done."

Perry, in a letter Thursday to Obama encouraging him to come to the border, touted Texas' position to help deal with the crisis.

"No state is better versed in this than Texas, and I, along with state and local law enforcement officials and Texas' Congressional Delegation, are ready and willing to help the federal government meet its responsibility to secure the border for the safety and security of all Americans," he wrote, according to Politico.

"If this was great for a potential 2016 run or if it was awful for a 2016 run, he would be doing the exact same thing," said Republican strategist Rick Wilson. "This is reminding people that as governor, he's been extraordinarily successful. People trust the guy to be engaged and involved on this one and he's just taking care of business."

Republicans in Texas and on the Hill argue Perry's deep involvement with the border serves as a juxtaposition to that of the president, who has received criticism from both sides of the aisle for not visiting the border while he was in Texas.

"He's understandably disturbed that the president of the United States was coming to Texas to fundraise and won't bother to come to see what he and his administration describe as humanitarian crisis," said Texas Sen. John Cornyn. "If it's serious enough for him to send a $3.7 billion funding request to us, I would think it's serious enough for him to take the time to go down there and see for himself what the conditions are. It's happening to Texas, and Perry has ended up taking the leadership role and I'm glad he is."

Obama said on Wednesday he wasn't interested in photo ops, which is why he didn't make a trip the border on this trip to Texas.

Perry went to the border on Thursday. It was clear he didn't mind the photo op moment — Fox News Host Sean Hannity had tagged along and tweeted a photo of the pair, holding guns.