Speaking at Stanford University’s commencement on Sunday, New York Mayor Michael Bloomberg not only compared the push to legalize same-sex marriage to Martin Luther King’s civil rights movement but said he believed all 50 states will eventually legalize gay marriage. 

Bloomberg spoke about two upcoming Supreme Court rulings on the Federal Defense of Marriage Act and California’s Prop. 8, a measure that prohibited same-sex marriage by ballot initiative. 

“Marriage equality is the civil rights issue of our time-and I believe that it will become the law of the land in all 50 states if not in my lifetime, certainly in yours,” Bloomberg said. “No matter how the Supreme Court rules in these two cases, there is no doubt in my mind that both laws will soon be history. It is not a question of if; only a question of when.”

He said he was glad Stanford Law School professors–like Pam Karlan–were lead attorneys in the Defense of Marriage Act case and were “representing a woman named Edith Windsor, who is a New York City resident.” 

“That’s only fitting, because our city was the birthplace of the gay rights movement and I’m proud to say that New York State passed marriage equality in 2011.”

Bloomberg made sure to mention Stanford’s Martin Luther King Research and Education Institute, which is run by professor Clay Carson and houses Dr. King’s papers. He also noted this year is the 50th anniversary of King’s “Lettes from a Birmingham Jail” and “I Have a Dream” speech in order to connect the gay marriage fight to the civil rights movement.