Virginia's attorney general announced a mediated settlement Saturday to keep open Sweet Briar College, using $12 million raised by fiercely determined alumnae to keep the women's college afloat in the upcoming academic year and sweeping out leadership of the 114-year-old school.

Attorney General Mark Herring said the resolution came after hundreds of hours of negotiations involving the college, the local county attorney fighting its closure and the money-raising nonprofit, Saving Sweet Briar Inc. The announcement of a rescue plan ended months frantic efforts to save the school, litigation that reached the state's highest court, and national ruminations on the future of all-female higher education.

Herring said the agreement would be presented to a judge on 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. "Both sides displayed the courage of Sweet Briar alumnae."

In early May, leaders of the liberal arts college cited insurmountable financial challenges as the reason for the planned closure. They cited mounting debt, deferred maintenance on the historic 3,250-acre campus in Virginia's Blue Ridge Mountains and declining enrollment. The school was scheduled to shutter 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.

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."

Higher education experts, while acknowledging the steady erosion in the number of women's colleges, were surprised nonetheless that Sweet Briar's leaders had originally acted so quickly in their decision to close. They cited a sizeable endowment as one reason of wonderment.

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.

"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.

"Sweet Briar is open for business," said 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."