The writing was on the wall for Larry Summers. It was more than a year before he withdrew his name from consideration for chairmanship of the Federal Reserve, and the former Treasury secretary was up for the presidency of the World Bank.

In less than 24 hours, a brand new progressive women's group called Ultraviolet had collected more than 37,000 signatures demanding that President Barack Obama spike his former economic adviser and choose "a nominee who believes girls have the same potential as boys."

Obama named Dartmouth College president Jim Yong Kim for the position instead. The episode passed with little fanfare. But Summers' next run-in with the women's group and its allies would not go so quietly.

On Monday, the Senate is expected to confirm economist Janet Yellen as the first woman ever to head the Federal Reserve. The Fed chair, with the president hemmed in by opposition in Congress, is currently the most powerful policymaker in the United States, meaning that the most powerful public official in the world will soon be a woman.

Yet Yellen was never the president's first choice. The position had long been promised to Summers in exchange for his agreeing to serve during Obama's first term as economic adviser, rather than as Treasury secretary, the role he held in the Clinton administration. Throughout the summer, reports surfaced that Summers remained the president's leading choice for Fed chair, even though Yellen had attracted broad support and been endorsed by more than 450 economists across the political spectrum.

At first quietly, and then not so quietly, women went to work organizing opposition to Summers, based jointly on his failed economic track record and his history of sexist and insensitive remarks.

Ultraviolet and the National Organization for Women took the lead. While the grassroots groups gathered petitions, asked people to call Congress, and launched a public education campaign to highlight Yellen's abundant qualifications for Fed chair, a group of powerful female donors made personal calls to members of the Senate Banking Committee.

"It wasn't so much that we wanted a woman to head up the Fed," said Georgia Berner, a businesswoman and progressive donor who previously served on a regional Fed board. "It was that we did not believe that an intelligent, competent person should be discounted because of their gender."

Berner is a member of the Women Donors Network, an influential group of women who organize behind progressive causes. She told HuffPost that when she called members of the committee to lobby against Summers, her economic argument resonated with them. She noted that he had led the undoing of the Glass-Steagall Act, which removed the wall between banks and investment firms and arguably played a major role in the creation of banks that were "too big to fail."

"I did speak to a couple of male senators, one of whom said, 'You knew about Glass-Steagall?' with surprise and interest, I think pleased to hear from a female supporter who was advocating Yellen based upon economic philosophy rather than gender," Berner said.

Margery Tabankin, who advises Hollywood donors on which politicians and causes to support, was also involved in the effort, according to an internal list of supporters obtained by HuffPost, as was philanthropist Nancy Bagley and Los Angeles businesswoman Suzanne Lerner.

The Women Donors Network has 200 activist philanthropists and gives away more than $200 million a year to various progressive issues. The organization provided the seed funding for Ultraviolet, one of the main groups driving the Yellen campaign. But WDN president Donna Hall says the effort to get Yellen nominated did not actually involve a lot of money.

"Women had a strong voice," Hall told HuffPost. "I don't think very much money changed hands at all. What we did is a lot of organizing -- letters, advertising, a coordinated effort to bring awareness through Ultraviolet, Moveon.org, things like that. Public opinion came through very strongly in favor of a woman candidate who really had not been championed."

Senate Banking Committee staffers told HuffPost that women donors played a major role behind the scenes in moving Yellen's nomination forward.

“Janet Yellen had a lot of wind at her back because of the pressure that women’s groups and others not only put on the Administration but also members of the Banking Committee, there’s no question about it," said a Democratic aide involved in the process.

The donors hit Sens. Jon Tester (D-Mont.) and Heidi Heitkamp (D-N.D.), in particular, with calls. When those two prairie populists decided to oppose Summers, he no longer had a path through committee.

In addition to calling senators directly, Hall and more than 125 powerful female leaders wrote a letter to Obama and Senate Majority Leader Harry Reid (D-Nev.) urging them to nominate Yellen.

"While her nomination would be historic for breaking the glass ceiling at the highest levels of monetary policymaking, her experience and leadership while at the Federal Reserve are the most important qualifications you should weigh while making this important appointment," the letter said. "She has the stature, the record, the brilliance and the strength to capture the respect of her colleagues and to command the respect of bankers here and abroad."

Yellen, the former president and CEO of the Federal Reserve Bank of San Francisco and current vice chair of the Fed, was one of the few economists who predicted in 2007 that the housing bubble would burst. She also notably did not champion the financial deregulation policies that led to the recession.

Women's groups argued that Yellen was the most qualified candidate, and the fact that her nomination would break a glass ceiling was just a bonus. But as one WDN donor pointed out, nominating her turned out to be a smart political move for other reasons, allowing Obama to avoid a nasty confirmation fight over Summers at the height of Obamacare's troubled rollout. "The White House should send a gift basket to the women's groups for what they did," the donor said.

Ahead of Yellen's confirmation vote on Monday, Hall told HuffPost that her network of women donors is thrilled to have played such a major role in elevating a qualified woman to a typically male-held leadership position.

"White men make up 30 percent of people and 80 percent of Congress," she said. "That really has to be changed in order to have a democracy that's representative of our population, and this was one of those opportunities."