SWEET BRIAR, Va. (AP) _ Prominent alumnae of Sweet Briar College are rejoicing over a mediated settlement to keep the 114-year-old Virginia women’s college open, a rescue deal that caps frantic monthslong efforts to stave off a planned August closure.

Virginia Attorney General Mark Herring announced the settlement Saturday, saying $12 million raised by determined alumnae to keep the women’s college afloat this coming academic year. He said the resolution, which requires a judge’s OK, followed hundreds of hours of negotiations involving the college, a local attorney fighting closure and the money-raising nonprofit, Saving Sweet Briar Inc.

Sarah Clement, chairwoman of Saving Sweet Briar, said the settlement “is an answer to the prayers for many and a powerful validation of the value of fighting for what you believe in.”

The announcement follows difficult months of campaigning by alumnae, litigation that reached the state’s highest court, and national ruminations on the future of all-female higher education touched off by financial woes at the small but prominent liberal arts college tucked away in Virginia’s Blue Ridge Mountains.

In early May, leaders of the liberal arts college cited insurmountable financial challenges for the planned closure. They also said mounting debt, deferred maintenance on the historic 3,250-acre campus and declining enrollment were to blame for plans to shutter the school in late August.

The administration’s claim of a dire financial situation was challenged almost immediately by alumnae, students and faculty. They questioned whether the college’s finances were as dire as depicted. Higher education experts, while acknowledging the steady erosion in the number of women’s colleges, also were surprised Sweet Briar’s leaders had decided to close the school, given its hefty endowment.

Herring said the agreement would be presented to a judge Monday for his approval and final settlement. If approved, it would also end litigation aimed at blocking the college’s closure. “Looking back, all parties wanted to preserve the legacy of the college, one through orderly closure, and the other by keeping the college open,” Herring said in a statement.

Alumnae who fought to keep Sweet Briar running sounded jubilant.

“Sweet Briar is open for business,” declared Teresa Tomlinson, mayor of Columbus Georgia and Sweet Briar College’s 2015 commencement speaker. “If you want your daughters to be a woman of courage, leadership and capability, send her to Sweet Briar.”

Herring, a likely Democratic candidate for governor, had been the target of criticism from some alumnae who believed he should have led the legal challenge to keep the college from closing. His office brought together all the principals in hopes of reaching such a resolution. He said an agreement, once finalized, would also sweep away the school’s leadership.

“The agreed settlement certainly is better for all parties than continued litigation, and more importantly, Sweet Briar College will stay open,” he said in a statement.

While many students have made plans to attend other schools, many said they would return to Sweet Briar if they could. Some schools to which they transferred said they would allow students to return if Sweet Briar was resurrected.

Sweet Briar had about 530 students in the spring semester.

Amherst County Attorney Ellen Bowyer had led the court fight to keep Sweet Briar open, arguing that the institute that operated the school was a trust and subject to court approval. The college argued it was a corporation and did not need a judge’s blessing to make a business decision.

In a statement, Bowyer credited Saving Sweet Briar Inc., which launched the fundraising effort soon after President James Jones and the board announced the planned closure. “The strength of faith the alumnae have demonstrated in their college is extraordinary, and will stand the college in good stead in the future,” she said.

Sweet Briar issued a statement on the settlement: “While the current members of the board will be stepping down as part of this settlement, all of the directors offer their best wishes to the college’s new leadership and the assurance of any support that may be requested.”

Other key elements of the settlement:

_ The easing of restrictions on $16 million from the college’s endowment.

_ Saving Sweet Briar will deliver the first installment on the $12 million in donations with a $2.5 million payment by July 2. Bowyer and the group believe the funds are sufficient through the upcoming academic year.

_ Once the court approves the agreement, at 13 members of the board would resign and at least 18 new members will be elected, creating a majority. A list of candidates would be supplied by opponents of the planned closing.

_ Seven days after the settlement is approved by a judge, Jones would resign