In a life that ended at age 99, Ruth T. Bedford served with the Red Cross during the London Blitz, worked on Broadway as a Rodgers and Hammerstein production hand, raced thoroughbreds that won stakes at Saratoga and Belmont, and was a skilled aviatrix who flew a seaplane. ¶ But few people who knew Bedford in recent years were aware of her glamorous history. For much of the past half-century, Bedford lived modestly, volunteering at a hospital, driving an Oldsmobile station wagon and wearing jeans to muck out barn stalls.

Bedford, who died in June, had decided to leave a gift from her estate to the place she cherished most: the Foxcroft School near Middleburg, Va., an all-girls preparatory school she attended until graduating in 1932.

Though Bedford had indicated that she planned to leave something for the school, her bequest stunned Foxcroft administrators. A Standard Oil heiress, Bedford gave her alma mater $40 million, a single donation to be announced Tuesday that will more than double the school’s endowment. Foxcroft officials believe it to be the largest gift ever to an all-girls school and one of the largest gifts to a secondary school from a woman.

The scale of Bedford’s donation is the kind usually reserved for universities with thousands of students or private coed schools. Instead, it will go to a school of 157 girls in the Virginia countryside, a quarter of whom come from 15 foreign countries.

“It’s a transformative gift,” said Cathy McGehee, Foxcroft’s head of school. “It will help us fully realize all of our dreams.”

Freshmen Ximena Pidal, 14, left, from Mexico and Camila Kiger, 14, from Brazil, in a physics class. They are both boarding students. (Sarah L. Voisin/The Washington Post)

Foxcroft, which is considered one of the nation’s top schools for girls, will be sustained for generations by Bedford’s largesse, McGehee said. The gift ensures that hundreds of young women in the future will earn a world-class education, said Bill Weeks, a former trustee at the school.

“Her last act was consistent with her whole life by giving back,” said Weeks, who was a trustee for 12 years, ending in 2013. “Her greatest gift came at the end of her life.”

Bedford benefited from Foxcroft’s well-rounded curriculum and had an enduring relationship with the school.

“Our first response was ‘Wow,’ ” McGehee said. “It’s exciting for us to be able to say that now we can work more boldly to serve girls in education.”

Megan Murphy, executive director of the National Coalition of Girls’ Schools, said Foxcroft has a long-standing tradition of preparing young women for college or a life of civic engagement in high society. “It’s a place of incredible academic legacy,” Murphy said. “It has a proud heritage.”

McGehee said that Ruth blossomed at the school, which was founded in 1914 on 500 pastoral acres near the quaint village of Middleburg. In its century of existence, Foxcroft has educated the daughters of corporate titans and congressmen: The women of the Rockefeller, Carnegie, Mellon and Astor families have all walked the campus’s brick paths.

Bedford fit in well at Foxcroft. A natural athlete, she played basketball, performed as a cheerleader and was known for her poise in the saddle. Her 1932 yearbook entry includes the poem: “A gallant rider in very truth, is our swinging, singing Ruth. Though many a rider he’s let slip, Cross Country knows her iron grip.”

Dee Dee Querolo,17, a senior from Reston, tacks up before riding her horse. She is a boarding student at the school. (Sarah L. Voisin/The Washington Post)

Bedford’s grandniece, Libby McKinney Tritschler, said that her great-aunt’s adoration for Foxcroft never ended. Bedford left nothing in her estate for family members, she said.

“It was never about the money for my family,” Tritschler said. “Money wasn’t what they lived off of. They really gave back to their community.”

Bedford’s family fortune spans generations, to her grandfather, Edward T. Bedford, who served as director of Standard Oil in the early 1900s. He is credited with helping to develop and popularize a petroleum byproduct known today as Vaseline.

The Bedfords settled in tony Westport, Conn., on a coastal estate along the Long Island Sound. They gave large sums to local hospitals and charities, including the seed funding for a community YMCA. Her father, the industrialist Frederick T. Bedford, worked in the sugar, corn and maple-refinery business. He was hailed in a New York Times obituary as a philanthropist and yachtsman who owned a grouse moor in Scotland for hunting trips and organized a safari to Africa in the 1930s. He was lionized for his dairy farm, home to “one of the finest herds of Guernseys in the country.”

Ruth was the youngest of three Bedford daughters to reach adulthood; a fourth sister died in infancy. Her father, who had homes on Fifth Avenue next to Central Park and the estate in Connecticut, introduced Ruth to society at a debutante ball at the Ritz-Carlton in New York.

“Miss Ruth Bedford Greeted by Throng,” read the bold-type headline of the Times account of her December 1932 dinner dance, where Bedford wore an ivory gown and clutched orchids.

Though a child of privilege, Bedford volunteered for wartime service as a nurse with the Red Cross in Europe. Following a passion for the theater arts kindled at Foxcroft, Bedford worked on Broadway, including as the casting assistant for the Rodgers and Hammerstein comedy “Happy Birthday,” which netted star Helen Hayes her first Tony Award, in 1947, for best actress.

Tritschler said that for most of the past 50 years, Bedford lived quietly in Westport. She tended to potbelly pigs and llamas and raised stakes-winning thoroughbreds, including the turf champion Banrock.

Bedford leaves no immediate survivors. Her family says she never married after she lost the chase for the man she loved — to one of her sisters.

The story goes that it was Tritschler’s grandmother, Lucie Bedford, who was the white-glove socialite among the three sisters. The daring Ruth, it was known, preferred to live at a pace more vigorous than a waltz.

“I always thought Aunt Ruth was the sporty one — she was very outdoorsy and very athletic,” Tritschler said. “She was not afraid to do anything.”

In the 1920s, both Lucie and Ruth fell in love with Briggs Cunningham, a millionaire Le Mans race-car driver from Westport who later made the cover of Time.

To win his adrenaline-thirsting heart, Ruth set out as a teenager to earn her pilot’s license. She hoped it would allow her to spend more time with Cunningham, who frequently flew to Long Island tending to business.

In the end, it was Lucie who walked down the aisle as Mrs. Cunningham in October 1929. Ruth was said to never again have pursued anyone.

“They say he was her one true love,” Tritschler said.

Instead, Bedford dedicated the rest of her life to social service, Tritschler said. For 50 years,she volunteered at the Norwalk Hospital in Fairfield, Conn., where she visited with cancer patients. She gave charitably, especially for educational causes. Her gift to Foxcroft exemplifies Bedford’s devotion to helping others.

“There’s a saying that to whom much is given much is expected,” Weeks said. “I really feel that it’s fitting of Ruth’s life.”