President Donald Trump invited Navajo Code Talkers to the White House Tuesday to honor them and celebrate Native American Heritage Month, but the honor took a turn toward controversy when Trump used a racially tinged nickname to refer to a senator.

While speaking before the Navajo Code Talkers, Trump called out Sen. Elizabeth Warren, referring to her as "Pocahontas."

"You were here long before any of us were here," the president said. "Although we have a representative in Congress who they say was here a long time ago. They call her 'Pocahontas.'"

The president made the remark at an event meant to honor and recognize the contributions and sacrifices made by Native American war heroes, according to a release from the White House.

The Navajo Code Talkers used their language, Navajo, in coded form to help the Allied forces during World War II. The Code Talkers took part in every assault by the U.S. Marine Corps. and served in all six Marine divisions.

RELATED: Navajo Nation to Trump after 'Pocahontas' comment: 'Cultural insensitivity is unfortunate'

The White House saidTrump meant no offense.

White House Press Secretary Sarah Huckabee Sanders says what's offensive is not the president's comments, but Warren's claim about her heritage.

Five Code Talkers visited the White House for the event. Their photos and bios, according to a White House release, are below:

Fleming Begaye Sr., Private - U.S. Marine Corps.

Navajo Code Talker Fleming Begaye Sr. (Photo provided by the White House)

Fleming Begaye is a successful businessman who grew his small savings into a complex of businesses. He has contributed financial backing and goods to the Navajo Community College, Navajo Police Department, local events and community groups, teams, churches and schools.

In 2016, Fleming was named the Honorary Chair of the Native American Coalition of the Donald J. Trump for President Campaign.

Roy Hawthorne, Corporal - U.S. Marine Corps.

Navajo Code Talker Roy Hawthorne. (Photo provided by the White House)

Roy Hawthorne served in both World War II and the Korean War. He served as a Code Talker in the Marines from 1943 to 1945. He hopped from island to island across the South Pacific as U.S. troops fought their way toward Japan.

Thomas H. Begay, Corporal - U.S. Marine Corps.

Navajo Code Talker Thomas H. Begay. (Photo provided by the White House)

Thomas H. Begay was just 16 years old when he enlisted in the U.S. Armed Forces. During the Battle of Iwo Jima, Private First Class Begay transmitted hundreds of secret messages over the radio network in 1945. He then served in the U.S. Army during the Korean War as a parachutist, glider-man and in combat.

Begay is a survivor of the Chosin Reservoir battle in November to December, 1950 against the Korean and Chinese forces.

After serving the country, Begay held a career in the U.S. Department of Interior, Bureau of Indian Affairs. In 1984, he retired after 40 years of federal service. He was involved with the local school board, youth activities and started the Navajo Youth Baseball League in Chinle, Arizona.

Samuel Holiday, Private First Class - U.S. Marine Corps.

Navajo Code Talker Samuel Holiday. (Photo provided by the White House)

During World War II, Samuel Holiday served in combat with the Fourth Marine Division. Throughout this time, he served duties on the islands of Roi Namur, Kwajalien, Tinian, Saipan and Iwo Jima. He served from 1943 to 1945.

Holiday collaborated with historian Robert S. McPherson to finish a book that recounts the entire life of a Code Talker, not just focusing on the war.

Alfred Newman, Private First Class - U.S. Marine Corps.

Navajo Code Talker Alfred Newman. (Photo provided by the White House)

Alfred Newman served in the First Battalion, 21st Marine Regiment, Third Marine Division from 1942 to 1946. Newman was stationed at San Diego, California and was involved in action at New Caledonia; Guadalcanal (Solomon Islands); Bougainville Island (Solomon Islands); Guam (Mariana Islands) and Iwo Jima in the Pacific Theater during World War II.

The Associated Press contributed to this report.