A Chester County judge ordered Friday that Brenda A. Allen be reinstated as president of Lincoln University immediately and that the school’s board of trustees hold a special meeting Aug. 6 to reconsider a new contract for her.

The move came just days after a stay in the lawsuit filed by Allen’s attorney was granted by the same judge, William P. Mahon, as the university agreed to hold a meeting July 31 at which Allen’s contract was expected to be considered. Pennsylvania Gov. Tom Wolf and state Attorney General Josh Shapiro also sued the university’s board of trustees last week, saying they violated the state’s Sunshine Act and the university’s own bylaws when they voted in secret against negotiating a new contract with her on July 10.

But confusion ensued when the board put out its agenda for the July 31 meeting and said it would vote on appointing an interim president before holding a discussion on Allen’s contract.

Allen’s attorney, Riley H. Ross III, said he asked Mahon to intervene.

“We’re definitely pleased with the court’s ruling because it means that Lincoln will have someone guiding it as it prepares for whatever may come for the fall semester,” he said.

A university spokesperson declined comment.

Controversy erupted at Lincoln earlier this month as rumors circulated that the board planned to not retain Allen, who has led the school for three years, earning widespread support among faculty, students, and alumni. More than 14,000 people signed an online petition backing Allen, whose contract ran out June 30.

Allen, a 1981 Lincoln graduate, sued the board last week, saying members illegally voted to end her tenure. Allen, her supporters say, has improved student retention and alumni giving.

In his order Friday, Mahon set the agenda items for the board to address at the Aug. 6 meeting and the order in which they must be addressed. They include the seating of five state-appointed trustees who were barred from voting on Allen’s contract extension at the July 10 meeting, followed by the rejection of letters of resignation from two board members, Judith Fitzgerald and Robert Allen, who had left the board after that vote.

And the board must address whether Allen should get a new contract, and if that is rejected, then vote on the selection of an interim president, Mahon ordered.