Sarah Palin (Virginia Postic/AP)

Sarah Palin, who has acknowledged tensions between her allies and Sen. John McCain's (R-Ariz.) at the end of the 2008 presidential campaign, praised McCain on Monday in the face of a rebuke from his own state party.

In a Facebook post, McCain's former vice presidential running mate also praised McCain as "a friend."

"I consider Senator John McCain an American hero and a friend," Palin wrote Monday. "He fights to remind our president that the federal government’s first priority must be strong defense of our homeland, and ... he fights against big-spending colleagues who don’t prioritize for our military’s needs."

Arizona Republicans in recent days voted to censure McCain for not being conservative enough -- something Palin mentioned specifically in her post.

"It goes without saying we don’t all agree on all political issues. For instance, I shall keep pushing to open ANWR, I oppose letting illegal aliens cut in line and receive American benefits via 'immigration reform,' and I oppose any congressional action that allows President Obama to incur more U.S. debt," Palin wrote. "During this time of dangerous lawlessness in the executive branch, those who agree on stopping the intended transformation of our country had better unite to fight. So at this time, it's perplexing to see Senator McCain’s good efforts to uncover the Obama agenda being ignored and perhaps even hindered now by those wanting to censure the Arizona senator."

The move is somewhat unusual for Palin, who has often aligned herself with the more conservative wing of the Republican Party -- which has often been critical of McCain, who has pushed comprehensive immigration reform and criticized more conservative senators like Rand Paul (R-Ky.).

Palin added: "Upon the senator’s shoulders, he’s carried part of our message of opposition to today’s 'fundamental transformation' of America directly to the problem: President Obama and Harry Reid’s far left agenda."