Hillary Clinton’s views evolved on same-sex marriage within the first 72 hours of her presidential run, as her campaign said on Wednesday that the former secretary of state now backs marriage equality as a US constitutional right.

The about-face, dropped as Clinton was preparing the second of two progressive-leaning appearances in Iowa, represents a significant – if not completely unexpected – shift from her previous statements that same-sex marriage should be legislated state-by-state rather than on the federal level.

LGBT activists said the move, while potentially motivated by politics and conveniently timed to Clinton’s presidential run and a looming US supreme court case, represented something of a milestone.

“Hillary Clinton supports marriage equality and hopes the supreme court will come down on the side of same-sex couples being guaranteed that constitutional right,” Clinton’s spokeswoman, Adrienne Elrod, said in a statement confirmed by the Guardian.

The supreme court is scheduled to hear arguments on the constitutionality of state bans of same-sex marriages on 28 April, with a decision expected in June that could effectively make marriage equality legal nationwide.

Last June, Clinton told NPR that she thought marriage was a state issue.

“[F]or me, marriage has always been a matter left to the states,” she said in the interview with public radio’s Terry Gross. “I fully endorse the efforts by activists to work state by state.”

Since then, Clinton had repeatedly dodged press inquiries on the topic.

The former secretary of state did not formally say whether she supported same-sex marriage at all until March 2013, when she appeared in an online video released by the LGBT advocacy group Human Rights Campaign (HRC). Previously, Clinton had only said publicly that she supported civil unions.

The former first lady did advocate for LGBT rights while at the State Department: “Gay rights are human rights,” she said during a 2011 speech in Geneva.

The HRC president, Chad Griffin ,called Wednesday’s more direct federal coming-out party a “strong statement”.

Gregory Angelo, president of Log Cabin Republicans, a gay advocacy group, was less charitable.

“It was good to see that Clinton, after much heel-dragging, has finally come into line,” he told the Guardian.

Indeed, Clinton has a complicated history on gay rights.

While she was first lady, former president Bill Clinton signed the Defense of Marriage Act (Doma), which prohibited the federal government from recognizing same-sex marriages. Much of that law was struck down by the supreme court in the 2013 case of United States v Windsor.

This year’s new landmark case before the high court, Obergefell v Hodges, represent a kind of full-circle rotation by the judiciary branch after Clinton long-derided 1996 signature of Doma, which he admitted to regretting just before the Winsdor case was argued.

Bill Clinton also approved the controversial “don’t ask, don’t tell”, which prevented openly gay men and women from serving in the US military.

Former Maryland governor Martin O’Malley – perhaps Hillary Clinton’s most aggressive competitor for the Democratic nomination in 2016, though he has not declared – has already said that same-sex marriage is a human right and should not be left to the states.

He released a video on Wednesday, in which his narration says, in a not-so-subtle dig at the competition, that “history celebrates profiles in courage, not profiles in convenience”.

O’Malley, who successfully pushed for the passage of same-sex marriage in Maryland, has also evolved on the issue and previously only supported civil unions himself.