The Virginia General Assembly unanimously elected two new justices to the commonwealth’s Supreme Court on Friday, ending a six-month stalemate over judicial appointments.

Members of the House of Delegates and Senate voted unanimously in special session to elevate Court of Appeals judges Elizabeth A. McClanahan and Cleo E. Powell, who becomes the high court’s first African American female justice.

Last week, Gov. Robert F. McDonnell (R) chastised legislators for not moving more swiftly on appointments to the commonwealth’s high court and trial courts, saying a spate of vacancies “is having a major negative impact on Virginia’s judicial system.”

The situation has been further complicated by the inability of the Democratic Senate and Republican House to come to terms on a congressional redistricting plan. Both chambers have stood in recess while a joint committee hammers out compromise boundaries. Had the chambers adjourned for the legislative term, McDonnell could have appointed judges to serve until a new assembly met.

Virginia and South Carolina are the only states whose legislatures elect high-court judges.

No redistricting plan was presented to legislators Friday, but the chambers reached a compromise on the appointments; McClanahan was favored by the Republican House, Powell by the Democratic Senate.

“It is an historic day for Virginia to add two women to the Supreme Court, only months after the appointment of our first female Chief Justice,” McDonnell said in a statement thanking legislators. Cynthia D. Kinser was appointed chief justice in February.

The high court will return to its full complement of seven justices for the first time since Justice Lawrence L. Koontz Jr. retired in January. Justice Leroy R. Hassell Sr. died in February.

In his letter to legislative leaders last week, McDonnell said the court has been hearing fewer cases with smaller panels of judges because of the vacancies.

Carl W. Tobias, a University of Richmond law professor, said vacancies on the Supreme Court and trial courts have led to bigger caseloads and delayed rulings. “Justice delayed is justice denied, and it has had a serious impact,” he said.

To fill the appeals court vacancies, legislators unanimously elected Stephen R. McCullough, a senior appellate counsel with the attorney general’s office, and Glen A. Huff, a Hampton Roads lawyer and former law partner of McDonnell’s.

The court also filled three circuit court posts. Several lower-court posts remain unfilled.

The new appointments — which last 12 years for the Supreme Court justices, eight years for the lower court judges — take effect Aug. 1.

Both houses again recessed Friday rather than adjourn in hopes that a congressional redistricting deal will soon be reached.