ARLINGTON, Va. -- Three days after Election Day, President Barack Obama used his last Veterans Day speech to urge Americans to learn from the example of veterans as a divided nation seeks to "forge unity" after the bitter 2016 campaign.

Obama, in remarks at Arlington National Cemetery, noted that Veterans Day often comes on the heels of hard-fought campaigns that "lay bare disagreements across our nation."

"But the American instinct has never been to find isolation in opposite corners," Obama said. "It is to find strength in our common creed, to forge unity from our great diversity, to maintain that strength and unity even when it is hard."

He added that now that the election is over, "as we search for ways to come together, to reconnect with one another and with the principles that are more enduring than transitory politics, some of our best examples are the men and women we salute on Veterans Day."

Tuesday's election of Republican Donald Trump led to protests across the country.

Obama noted that the U.S. military is the country's most diverse institution, comprised of immigrants and native-born service members representing all religions and no religion. He says they are all "forged into common service."

With just two months left in his term, Obama also noted how he's aged over the past eight years.

He read excerpts from an essay by a middle-schooler who wrote that veterans are special because they will defend people regardless of their race, gender, hair colour or other differences.

"After eight years in office, I particularly appreciate that he included hair colour," Obama quipped.

Turning serious again on his final Veterans Day as commander in chief, Obama said that "whenever the world makes you cynical, whenever you doubt that courage and goodness and selflessness is possible, then stop and look to a veteran."

"On Veterans Day, we acknowledge humbly that we can never serve our veterans in quite the same way that they served us, but we can try. We can practice kindness, we can pay it forward, we can volunteer, we can serve, we can respect one another, we can always get each other's backs," he said.

Before speaking, the president laid a wreath at the cemetery's Tomb of the Unknowns. He bowed his head in silent tribute before a bugler played taps.

Obama also held a breakfast reception at the White House with veterans and their families.

------

Associated Press writer Nancy Benac in Washington contributed to this report.