ABC News April 2, 2019

South Bend, Indiana Mayor Pete Buttigieg once won an essay contest through the JFK library. The topic? Bernie Sanders

WATCH: Pete Buttigieg wants to instill sense of 'servant leadership' in America

When an 18-year-old Pete Buttigieg won an essay contest through the John F. Kennedy Presidential Library and Museum, he couldn't have known he might one day run against the subject of his entry: then Rep. Bernie Sanders.

"There’s no way I would have guessed that I’d be in this situation," Buttigieg said in a recent interview on the podcast, Pod Save America.

(MORE: Mayor Pete Buttigieg officiates a hometown wedding on day off from the campaign trail)

The John F. Kennedy Profile in Courage Essay Contest asks students across the nation to write an essay focusing on an elected official in the United States who courageously addressed a political issue. In 2000, Buttigieg’s essay won out of more than 600 essay submissions.

Justin Sullivan/Getty Images
Democratic presidential hopeful South Bend, Indiana mayor Pete Buttigieg speaks at the Commonwealth Club of California, March 28, 2019, in San Francisco.

In his writing, Buttigieg praised Sanders as a "powerful force for conciliation and bi-partisanship on Capitol Hill."

"Here was somebody who really just said what he was for and he didn't seem to care as much about the politics of it," Buttigieg said on the podcast.

(MORE: How Pete Buttigieg Could Win The 2020 Democratic Nomination)

The 37-year-old mayor of South Bend, Indiana is exploring a 2020 presidential bid crowded with declared Democratic candidates, including the senator from Vermont.

"I absolutely would not have pictured then that I’d wind up potentially competing with him," Buttigieg told Pod Save America.