With the Supreme Court expected to rule any day now on whether states' same-sex marriage bans are constitutional, Hillary Clinton has become one of the country's most prominent politicians in favor of marriage equality.

Every loving couple & family deserves to be recognized & treated equally under the law across our nation. #LoveMustWin #LoveCantWait –H — Hillary Clinton (@HillaryClinton) April 28, 2015

But Clinton's prominent support for same-sex marriage rights is part of a sharp shift on the issue over the past few years — a transformation that has, in many ways, mirrored what Americans as a whole went through in the same time span.

During her 2008 campaign, Clinton opposed federal same-sex marriage rights, saying the issue should be left to the states. But as she takes on a 2016 campaign, she's now in complete support.

It's a pivot that she has struggled to explain, including in June when she told NPR's Terry Gross, "I think you're trying to say that, you know, I used to be opposed, and now I'm in favor, and I did it for political reasons — and that's just flat wrong."

It's easy to imagine that Clinton, like other politicians, made a calculated political decision to flip-flop. The political environment is far friendlier to LGBT rights than it was just a decade ago, after all. But Clinton, who's 67 years old, would be similar to millions of other Americans in her age group if she changed her mind for nonpolitical reasons. Support for same-sex marriage nearly tripled among Americans around Clinton's age between 1996 and 2014, according to Gallup surveys.

So even though Clinton might find herself in a predicament — supporting a policy she once did not — in the case of same-sex marriage, her own attitudes and changing beliefs mirror the public's. There's a charitable version of Clinton's evolution that looks a lot like the American public, which has come to see the issue differently and genuinely evolved.

"I think most Americans — LGBT and not —appreciate the journey that so many folks have taken on the issue of marriage," Jason Rahlan, a spokesperson for the Human Rights Campaign (HRC), who also worked for Clinton at the State Department and her 2008 campaign, told me in an email. "Many have seen it within their own families."

Hillary Clinton’s evolution matches national trends

Even the way Clinton talks about the issue is similar to other Americans. Clinton insists that she genuinely evolved her stance — a phrase President Barack Obama also used to describe his thoughts on same-sex marriage. As Clinton has explained it, she didn't grow up thinking about the possibility of same-sex marriages, but she shifted her position as advocates pushed the issue into the public spotlight and forced her to give it thought.

"Just because you're a politician, doesn't mean you're not a thinking human being," Clinton told NPR's Gross. "You gather information, you think through positions, you're not 100 percent set … you're constantly reevaluating where you stand. That was true for me."

The final reevaluation came when Clinton officially announced her support for same-sex marriage in 2013.

Clinton's relationship with LGBT advocates has always been somewhat tense, not least because President Bill Clinton approved the Defense of Marriage Act, which effectively banned same-sex marriages at the federal level until the Supreme Court struck down part of the law in 2013.

But LGBT advocates quickly fell behind Clinton when she announced her support for marriage equality. HRC President Chad Griffin wrote at the time, "We are honored to have Secretary Clinton's moving statement as part of our Americans for Marriage Equality series. Now that she has left office and can speak publicly about the issue that is so important to all of us, Hillary shares her experience as secretary and what she learned while representing our country around the world, and what she has come to believe."

Ultimately, Clinton's position on this issue may not matter — the US Supreme Court will decide whether states' same-sex marriage bans are constitutional later this year, setting the stage for a final decision in June that could bring marriage equality from 37 to all 50 states.

Clinton has taken other steps to look LGBT-friendly

Clinton's shift is part of a broader change in favor of LGBT rights. With the spread of marriage equality, LGBT advocates expect to turn their focus to the growing fight for civil rights protections in 29 states that don't have laws in place to protect all LGBT workers from discrimination.

When Indiana passed a controversial religious freedom law last month that triggered a national firestorm, Clinton tweeted her opposition, siding with critics who fear the law will allow businesses to discriminate against LGBT residents.

Sad this new Indiana law can happen in America today. We shouldn't discriminate against ppl bc of who they love #LGBT http://t.co/mDhpS18oEH — Hillary Clinton (@HillaryClinton) March 27, 2015

The laws, which exist in 19 states besides Indiana, prevent the government from intruding on a person's religious practices without a compelling interest. Critics say the laws could let businesses deny jobs, housing, and services to LGBT people, although legal experts argue — citing decades of court battles in which the laws were never used to enable discrimination — that it couldn't be used to discriminate.

Regardless of the law's actual effect, Clinton's sentiment shows a candidate who's much more willing to look LGBT-friendly than she did in the past.

It may seem like a politically convenient flip-flop for pundits, but many Americans may not care, since they went through a similar transformation over the past few decades.