FLAGSTAFF, Ariz. -- Families of Native American war veterans and politicians of both major parties are criticizing President Donald Trump for using a White House event honouring Navajo Code Talkers to take a political jab at a Democratic senator he has nicknamed "Pocahontas."

The Republican president on Monday turned to a nickname he often deployed for Massachusetts Sen. Elizabeth Warren during the 2016 presidential campaign to mock her claims about being part Native American. He told the three Navajo Code Talkers on stage that he had affection for them that he doesn't have for her.

"It was uncalled for," said Marty Thompson, whose great-uncle was a Navajo Code Talker. "He can say what he wants when he's out doing his presidential business among his people, but when it comes to honouring veterans or any kind of people, he needs to grow up and quit saying things like that."

Pocahontas is a well-known historical figure who bridged her own Pamunkey Tribe in present-day Virginia with the British in the 1600s. But the National Congress of American Indians says Trump wrongly has flipped the name into a derogatory term, and the comment drew swift criticism from American Indians and politicians.

"Our nation owes a debt of gratitude to the Navajo Code Talkers, whose bravery, skill & tenacity helped secure our decisive victory over tyranny & oppression during WWII," Arizona Republican Sen. John McCain, a decorated veteran of the Vietnam War, tweeted Tuesday. "Politicizing these genuine American heroes is an insult to their sacrifice."

Warren said Trump's repeated references to her as "Pocahontas" will not keep her from speaking out.

"Now he seems to think that that's somehow going to shut me up, maybe keep me from talking about the consumer agency today," Warren said Tuesday after a protest outside the Consumer Financial Protection Bureau. "Or keep me from talking about the tax bill that would favour giant corporations instead of working families."

"He's wrong. It's not going to make any difference," Warren said.

All he "had to do was make it through the ceremony," she said. "But that wasn't possible for Donald Trump. He had to throw in a racial slur."

White House spokeswoman Sarah Huckabee Sanders, asked Monday about criticism of Trump's remarks, said a racial slur "was certainly not the president's intent."

Trump made the comment as he stood near a portrait of President Andrew Jackson, which he hung in the Oval Office in January. Trump admires Jackson's populism. But Jackson is an unpopular figure in Indian Country because he oversaw the forced removal of American Indians from their southern homelands.

The Navajo Nation suggested Trump's remark was an example of "cultural insensitivity," and they resolved to stay out of the "ongoing feud between the senator and President Trump."

"All tribal nations still battle insensitive references to our people. The prejudice that Native American people face is an unfortunate historical legacy," Navajo Nation President Russell Begaye said in a statement.

Still, Begaye and relatives of Navajo Code Talkers said they're honoured the story of the men recruited from the vast Southwest reservation to become Marines could be told on a national stage. Peter MacDonald, a former Navajo chairman and trained Code Talker, who stood beside Trump, also took the opportunity to ask for support for a Navajo Code Talker museum. Trump obliged.

Michael Smith, a Marine whose father was a Code Talker, said most of the Code Talkers would be skeptical about going to the White House because it could be construed to mean they support a political cause.

"So, why did they go? Why were they there? He's putting them in the Oval Office to say 'You did a good job, and say hi to Pocahontas?"' Smith said. "They should be taken care of as heroes, not as pawns."

Michael Nez, whose father helped develop the code based on the Navajo language, said his father would have been upset to hear Trump's "Pocahontas" comment. But, as other Code Talker relatives said, his father was taught to respect the president as the commander in chief.

"It's too bad he does put his foot in his mouth," Nez said. "Why he does it? I don't know."

The president has long feuded with Warren, an outspoken Wall Street critic who levelled blistering attacks on Trump during the campaign. Trump seized on questions about Warren's heritage, which surfaced during her 2012 Senate race challenging incumbent Republican Sen. Scott Brown.

Democratic New Mexico Sen. Tom Udall, vice chairman of the Indian Affairs committee, said: "Donald Trump's latest racist joke -- during Native American Heritage Month, no less -- demeaned the contributions that the Code Talkers and countless other Native American patriots and citizens have made to our great country."