U.S. President Barack Obama attends a town hall interview with ESPN anchor Stan Verrett on "race, sports and achievements" at North Carolina Agricultural and Technical State University in Greensboro, North Carolina, U.S. October 11, 2016. REUTERS/Carlos Barria

GREENSBORO, N.C. (Reuters) – President Barack Obama won two straight elections for the White House, but on Tuesday during a talk with students at a town hall on race and sports he discussed a few times when he did not always come out on top.

Obama recounted the fallout from his first presidential debate in his ultimately successful 2012 election race against Republican Mitt Romney.

“I had that first debate, which was roundly panned. Everybody said you were terrible,” Obama said at the town hall hosted by ESPN’s The Undefeated at North Carolina A&T State University. “What is true is that I’ve always kind of hated these debate formats, so it wasn’t my best performance.”

He said what really inspired him to “dig deep” for the second debate was seeing young volunteers around the country. While they put on a brave face, Obama said he could tell they were worried about the race.

“I just thought to myself these kids are pouring their hearts and souls into making calls and knocking on doors, I’m not going to disappoint them,” he said.

Obama also described his experience losing his first campaign for a U.S. congressional seat in 2000 and how it humbled him. Without that defeat, Obama said he did not believe he would have went on to win his Senate race in 2004.

“What is true about politics that is similar to sports, though, is when you lose, you lose publicly,” he said. “It’s a hard feeling. One of the benefits of defeat is to take some of the vanity out of what it is you’re trying to achieve.”

The issue of race and sports has been in the spotlight recently after NFL quarterback Colin Kaepernick of the San Francisco 49ers started a controversial movement when he chose to stay seated, and then later opted to kneel, for the national anthem this season to protest racial injustice.

Asked about sports and activism, Obama cited two of his childhood sports heroes: boxer Muhammad Ali and tennis player Arthur Ashe. Both had totally different styles, with Obama saying Ali was more outspoken and Ashe more buttoned down. But he said they both brought about change.

“How you do it is less important than your commitment to use whatever platforms you have to speak to the issues that matter,” he said.

(Reporting by Ayesha Rascoe; Editing by Bernard Orr)