Sarah Palin appeared with John McCain on Friday for the first time since the pair lost the 2008 presidential election, telling a Tucson, Ariz., rally that the Republican senator deserved the support of conservatives in his hotly contested bid for reelection. Palin gave McCain a fiery introduction, emphasizing his opposition to the recently passed healthcare overhaul.

“I want to clear the air right now,” she said, referring to conservative “tea party” activism as “a beautiful movement.”

“Everybody here today supporting John McCain, we’re all part of that tea party movement.”

McCain applauded and predicted that the healthcare overhaul would be overturned by the courts. “Repeal and replace,” he said, using what has become the GOP rallying cry for the midterm election.

“When it comes to Obamacare,” Palin joked, “I see Fidel Castro likes Obamacare and we don’t. Doesn’t that tell you something?”

The joint appearance was a role reversal for the pair. McCain plucked Palin from political obscurity to be his running mate, and now the former Alaska governor has the star power. In her book “Going Rogue,” Palin acknowledged tensions between her advisors and McCain’s during the presidential campaign. But the two have had kind words for each other in public.

McCain faces a tough primary fight with former congressman and radio talk show host J.D. Hayworth, who says the incumbent is not conservative enough, especially when it comes to immigration reform.

Hayworth supporters outside the rally were unimpressed, and said Palin was helping McCain because he launched her national career.

“It’s disappointing, but a lot of us understand it’s just political payback,” said Jennifer Leslie, 41, of Oro Valley, Ariz. McCain is “calling in his favors.” Leslie carried a sign that said “Sarah supporter for J.D. Hayworth.”

michael.muskal@ latimes.com

The Associated Press contributed to this report.