In June 2000, Hillary Clinton, then a candidate for U.S. Senate, walks in New York’s annual gay pride parade. She became the first first lady to do so. (Chris Hondros/Getty Images)

During her first run for president in 2008, Hillary Clinton had an opportunity to become an undisputed leader in the gay rights movement.

As she prepared for a forum on the gay-oriented Logo network, she reached out to her friend Hilary Rosen, a political consultant who is a lesbian. Rosen expressed frustration that so many mainstream political figures opposed legalized same-sex marriage, and she challenged Clinton to speak out for a community that had strongly supported her.

Clinton refused.

“I’m struggling with how we can support this with a religious and family context,’’ Rosen recalled Clinton telling her. Clinton just wanted to know the best way to explain the position.

Hilary Rosen, at left in 2013 in New York, said she was disappointed that her friend Hillary Clinton did not vocally support same-sex marriage in 2008. (Amy Sussman/Invision/AP)

The exchange was painful for Rosen, who had known Clinton since they worked on children’s issues together in the 1980s.

“We took it personally,” Rosen said. “You try not to because it’s politics, but in this case, the politics is personal.”

Rosen remains a Clinton friend and supporter, saying, “I know her heart is in the right place.” And Clinton eventually got where her friends wanted her to go, though her change of heart came when the political risk had disappeared — close to a year after similar shifts by President Obama and Vice President Biden.

This year, as the Democratic presidential nominee, she is running as a forceful advocate for the LGBT community and a full-fledged supporter of same-sex marriage. The country’s leading gay rights group, the Human Rights Campaign, endorsed her early in the campaign, lauding her as a “champion” for its cause.

Clinton’s path to get to this point frustrated many of her supporters. While most national politicians have been slow to evolve on gay marriage, Clinton’s handling of it was particularly saddening to some activists because they had expected more. Clinton and her husband, Bill, had stood out as being among the first to actively court the gay community as an interest group and donor base — and yet they were unwilling to stand with the community on one of its biggest civil rights issues.

“You could see the powerful way she has leveraged her influence on behalf of women and children or other issues,” said Alan van Capelle, a former director of the now-disbanded Empire State Pride Agenda. “In terms of LGBT rights and marriage, there were people who led and people who followed. And on that issue, she followed.”

Clinton’s approach to same-sex marriage illustrates the caution that has come to define her political career. It also reflects a central challenge for the 68-year-old candidate, who along with her husband helped to shape an era of centrist politics designed to appeal to culturally conservative voters but has struggled to adapt to a generation of Democrats who have moved further to the left.

Democratic presumptive nominee Hillary Clinton greets a throng of people attending the gay pride parade in New York City. (Reuters)

Among the Bill Clinton-era policies that Hillary Clinton has disavowed on the presidential campaign trail is the Defense of Marriage Act, the law signed by then-President Bill Clinton in the lead-up to his 1996 reelection effort that prohibited the federal government from recognizing same-sex marriage.

As Bill Clinton sought the 1992 Democratic nomination, LGBT activists were eager to align with the Clintons. The community had a strained relationship with the previous Democratic nominee, Michael Dukakis, whom activists heckled at a campaign event when he said he didn’t see the need to issue an order banning discrimination against gays in the federal government.

Bill Clinton sought to include the community as a part of his coalition. He thrilled hundreds when he spoke at an LGBT fundraiser at the Palace nightclub in West Hollywood.

“I have a vision and you’re a part of it,” Bill Clinton told the crowd, recalled Richard Socarides, who advised the Clinton White House on lesbian, gay, bisexual and transgender issues.

He spoke about increasing funding for AIDS research and ending discrimination against gay men and lesbians. Most provocative was his unequivocal promise to lift the ban on gay people serving in the military. He didn’t speak about marriage, which had not yet emerged as a major political issue.

As Bill Clinton focused on policy, Hillary Clinton developed friendships with LGBT activists. She would talk with same-sex couples about their children and share stories of parenthood. She’d acknowledge staffers with a smile if she saw them holding hands with their partners at their church and was comfortable asking for details about relationships.

Rosen said that Clinton, even as she grappled with her views of marriage, was personally supportive when Rosen adopted her children. “I saw up close her struggle with this in conversations that she and I had, and I believe [she had] the same genuine struggle that many people of her generation felt, and so I don’t ever think it came from a cruel place, or a prejudicial place,” Rosen said.

The night before Roberta Achtenberg, then a member of the San Francisco Board of Supervisors, was scheduled to make history at the 1992 Democratic National Convention as the first openly lesbian person to ever address the gathering, Hillary Clinton called to give her a pep talk.

“I’m rooting for you,” Achtenberg recalled Clinton saying.

In 1993, Bill Clinton’s first year in office, relations began to fray. Members of Congress and military officials were arguing against lifting the ban on gays serving in the military. Many strategists thought the president didn’t have the political capital to push through his idea, so he had to compromise. The result was the “don’t ask, don’t tell” policy, which allowed gay men and women to serve in the military as long as they were not open about their sexual orientation.

Those who spoke to Hillary Clinton at the time said she encouraged her husband to find more support in Congress to avoid the compromise. But there was little she could do. “Bill knew the issue was a political loser,” she wrote later in her 2003 autobiography, “Living History.”

Three years after “don’t ask, don’t tell,” the president faced another question about gay rights. Lawmakers were crafting legislation mandating that the federal government recognize only heterosexual marriage. Some White House strategists worried that if Clinton didn’t back the legislation, he might lose the support of the centrists who had helped propel him to the White House in the first place. LGBT staffers tried to change the president’s mind.

Hillary Clinton, whose influence had dwindled after her failed attempt to overhaul the health-care system, mostly stayed out of those discussions, Socarides said. Still, some gay activists hoped that she might be a voice for them in the West Wing.

Rosen, who at the time headed the recording industry trade association, asked Clinton whether she could help change her husband’s mind.

Hillary Clinton was not receptive, Rosen recalled, because she thought she needed to stand with her husband while making tough choices.

“No one said it was going to be easy,” Rosen said she told her, “but politicians have to make decisions. Someone has to be first.”

When the president signed DOMA, activists were livid.

“It was like a dagger to the heart,” Rosen reflected. “And at that point, it made supporting his reelection very difficult.”

Still, with Republican leadership threatening to take away funding for AIDS research, the Clintons offered the best opportunity to have any influence at all. Rosen and other gay rights activists hoped that Hillary Clinton might undo some of her husband’s legacy when she started to run for the Senate.

Clinton’s potential opponent, New York Mayor Rudolph W. Giuliani, had made inroads with the city’s affluent gay community, opposing the military’s ban on openly gay members. Clinton followed suit, announcing at a fundraiser in the SoHo art studio of a gay donor that she, too, was against “don’t ask, don’t tell.”

“Fitness to serve should be based on an individual’s conduct, not their sexual orientation,” Clinton said in a statement the next evening.

A month later, she demonstrated the limits to her support for LGBT rights — declaring that she was unwilling to support legalized marriage.

“Marriage has got historic, religious and moral content that goes back to the beginning of time, and I think a marriage is as a marriage has always been, between a man and woman,” she said during a January 2000 news conference.

Giuliani dropped out of the race, but Clinton’s embrace of the gay community carried on. She spoke in favor of civil unions gaining equal legal status as marriage, as well as efforts to end employment discrimination against homosexuals.

In June 2000, she strolled along Fifth Avenue behind a man on roller skates wearing only a thong and another in a pink tutu. Waving along to onlookers shouting, “I love you,” Clinton became the first first lady to walk in the city’s raucous gay pride parade.

Yet, as she was celebrating same-sex relationships, some activists in New York were losing patience.

In 2004, the mayor of San Francisco started approving marriage licenses for same-sex couples. Courts in Massachusetts had endorsed marriage rights. President George W. Bush called for a constitutional amendment banning gay marriage, energizing a conservative base that would help him secure a second term.

Clinton said she opposed amending the Constitution but said in a Senate floor speech that she took “umbrage at anyone who might suggest that those of us who worry about amending the Constitution are less committed to the sanctity of marriage or to the fundamental bedrock principle that it exists between a man and a woman.”

Clinton’s perpetual balancing act unnerved some supporters.

When Clinton began holding fundraisers for her Senate reelection campaign in 2006, van Capelle urged gay donors to withhold their checks because “she didn’t earn it.”

“If an environmental group [had] asked me to write a check for Hillary I would, and if reproductive rights group asked I would,” van Capelle said. “There was a strange relationship between politicians and fundraisers, and they thought they could use [LGBT activists] as an ATM machine and we didn’t want to be a part of it. I thought it set a bad example. What it said was you could do as little as you could at that time to get our support.”

Clinton’s position was softening. She supported states that legalized same-sex marriage. As for her position on the federal ban, her staff noted that her position was in a “state of evolution.”

Rosen, her longtime friend, said she pleaded with Clinton to stop discussing marriage in religious terms. The position seemed dogmatic and uncompromising, Rosen said.

“I encouraged her just to say she’s not fully comfortable with it,” Rosen said.

Some of Clinton’s allies tried to avoid the issue entirely. Allida Black, a historian and longtime friend, said she chose to focus her conversations with Clinton on pressing for policies to allow gay people to visit their partners in the hospital or bury their deceased loved ones. Nevertheless, Black said she never doubted that Clinton respected her relationship with her partner, Judy.

“You trusted her because of the way she treated us,” Black said.

Jason Collins, a professional basketball player who became friends with Chelsea Clinton while living in Wilbur Hall with her at Stanford University, marveled at how comfortable Bill and Hillary were dancing among gay couples at an ’80s prom that Chelsea had in the West Village to celebrate her 30th birthday in 2010.

“Chelsea kept a diverse inner circle,” Collins said, “and you know that probably had an effect on her parents’ thinking.”

When Collins decided he was ready to become the first major professional athlete to come out in 2013, he looked to Bill and Hillary Clinton for advice.

“There’s going to be a moment where everything is going so fast it feels like it’s moving at a million miles per second,” Collins recalled Hillary Clinton telling him. “At those moments, just take a breath, and keep going forward.”

As secretary of state, Clinton allowed same-sex partners of Foreign Service officers the same travel benefits at married couples.

She gave a speech in Geneva in 2011 in which she said, “Gay rights are human rights and human rights are gay rights,” an echo of the women’s rights speech she had delivered in China as first lady.

By May 2012, as polls showed more than half of the country supporting same-sex marriage, top Democrats began indicating their support. Biden declared in a television interview that he was “absolutely comfortable” with same-sex marriage. Obama followed soon after, saying that “same-sex couples should be able to get married.”

Clinton stayed silent.

Chad Griffin, the executive director of the Human Rights Campaign, said he privately pressed Clinton to shift her position. Griffin, who grew up in Hope, Ark., writing letters to then-Arkansas first lady Hillary Clinton, said her resistance on same-sex marriage was “really hard.”

Months after Obama’s statement of support, Griffin ran into Clinton on an Amtrak barreling from New York to Washington. She told him she wanted his ideas for the best way to show her support for same-sex marriage.

Griffin said he had long known that she would come around eventually, but “the moment felt like such a relief.”

In 2013, before the Supreme Court struck down a key part of DOMA, Clinton released a video with the Human Rights Campaign stating that she had reconciled her feelings. She was fully behind marriage.

Black, now a fundraiser for Clinton, could only smile when she saw Clinton’s video. But she had known it was coming. After she married her partner, Judy, in April 2012 — nearly a year before Clinton’s public announcement — Black came home to a note attached to her door. It was from Clinton.

“At long last!” it read.

Editor’s note: Material has been added to this story to more fully describe Hilary Rosen’s perspective on Hillary Clinton’s evolution on gay marriage.