President Trump speaks during an event honoring Native American “Code Talkers” in the Oval Office on Monday.  (Oliver Contreras/pool via Bloomberg News)

At a ceremony meant to honor a segment of the Native American community, Trump managed to offend.

During a White House event to recognize Navajo “code talkers,” a group that helped the Marines send coded messages in the Pacific Theater during World War II, Trump revived a jab that many consider to be a slur against Native Americans.

“You were here long before any of us were here. Although we have a representative in Congress who, they say, was here a long time ago. They call her ‘Pocahontas,’ ” said Trump, referring to Sen. Elizabeth Warren (D-Mass.).

The jab at Warren, which Trump first tweeted in 2014, elicited sharp pushback from some members of the Native American community.

“I am ashamed of President Donald J. Trump,” activist and Native News Online correspondent Mark Charles wrote on Facebook. “And President Trump could not muster enough self control to hold his tongue long enough to honor their service.”

Mihio Manus, a spokesman for the president and vice president of the Navajo Nation, told The Post he thought Trump’s comments about Warren were inappropriate.

“It’s unfortunate that President Trump would refer to Sen. Elizabeth Warren as Pocahontas in a joking way,” Manus said. “Pocahontas, although she wasn’t Navajo, definitely was a historical figure in the foundation of this nation who is misrepresented in history. And so we as the Navajo Nation don’t feel any member of any tribal nation should be used as the punchline of a joke.”

Warren's claims of Cherokee and Delaware Indian heritage first attracted national attention during her 2012 Senate run. While she had family stories, she did not have any documentation of her Native American ancestry to prove it, even though Cherokee groups demanded it. Her opponent, the Republican incumbent Scott Brown, claimed Warren used family lore to get an unfair advantage in getting hired to coveted faculty jobs at Harvard Law School and University of Pennsylvania Law School.

The Washington Post Fact Checker found no support for Brown's claims.

White House press secretary Sarah Huckabee Sanders said Monday that more Americans are offended by Warren's family lore than Trump's mocking of her.

“I think what most people find offensive is Senator Warren lying about her heritage to advance her career,” she said.

But even some within Trump’s own party found his troublesome. Sen. John McCain (R.-Ariz), who represents several Native American communities, tweeted: “Our nation owes a debt of gratitude to the Navajo Code Talkers .... Politicizing these genuine American heroes is an insult to their sacrifice.”

This isn't the first time Trump has attracted attention for his comments about Native Americans.

In the 1990s the former casino magnate secretly paid more than $1 million in ads portraying members of a tribe in Upstate New York as cocaine traffickers and career criminals.

During this time he accused some dark-skinned Native Americans in Connecticut of faking their ancestry, the Post's Shawn Boberg previously reported.

“I think I might have more Indian blood than a lot of the so-called Indians that are trying to open up the reservations,” Trump said during a 1993 radio interview with shock jock Don Imus.

“I think if you’ve ever been up there, you would truly say that these are not Indians,” Trump added. “One of them was telling me his name is Chief Running Water Sitting Bull, and I said, ‘That’s a long name.’ He said, ‘Well, just call me Ricky Sanders.’ ”

And Trump used the Pocahontas jab earlier this month to suggest that the Justice Department and the FBI should investigate the Democrats activity during the 2016 primaries.

Some of Trump's actions have added fuel to the controversy that he has slighted Native Americans.

Trump has frequently praised President Andrew Jackson, who is known for his harsh treatment of Native Americans. Monday's ceremony took place in front of a portrait of Jackson, who famously signed the Indian Removal Act, which led to thousands of Native American deaths as tens of thousands were forced to relocate.

Trump also failed to mention Native Americans in his Columbus Day proclamation. Instead, his campaign had a sale on “Make America Great Again” merchandise to honor Columbus's “legendary voyage to America.”

Native Americans also protested the administration's approval of the final permit to complete the Dakota Access Pipeline, which some argue violates treaties that indigenous groups living on the Standing Rock Indian Reservation signed with the federal government in the 1800s.

The president did get favorable marks for his willingness to meet with members of the Native American community at the beginning of his presidency to discus the policies impacting their community. But his refusal to walk away from using language that some say disrespects their value in the American story could end up having a significant impact on his relationship with Native Americans.