At a rally inside a partly rebuilt factory, once owned by the automaker Studebaker and now being turned into glass-sheathed offices for tech and other businesses, Buttigieg said, “I ran for mayor in 2011 knowing nothing like Studebaker would ever come back, but that we would, our city would, if we had the courage to reimagine our future.”

If elected, Buttigieg, a 37-year-old Rhodes scholar and veteran of the war in Afghanistan, would represent a series of historic firsts: the youngest president ever and the first who is openly gay.

He said he was motivated to run despite his youth because of an urgency to correct the course of the Trump administration on climate change, health care and immigration. “This is one of those rare moments between whole eras in the life of our nation,” Buttigieg said, adding, “The moment we live in compels us to act.”

He painted a picture of a hopeful future rooted in Midwestern values, contrasting his focus on a better life in 2030, 2040 and 2054 — the year he would be the same age as President Donald Trump is today — with what he called Trump’s appeal to “resentment and nostalgia.”

And he invoked his marriage to his husband, Chasten Buttigieg, as one of the blessings of American freedom, but one that feels fragile in the current climate.

“Our marriage exists by the grace of a single vote on the U.S. Supreme Court,” Buttigieg told a crowd of several thousand people. “Nine men and women sat down in a room and took a vote, and they brought me the most important freedom in my life.”

This article originally appeared in The New York Times.