Cardinal Zenon Grocholewski, retired prefect of the Congregation for Catholic Education, died July 17 at the age of 80.

A close collaborator with St. John Paul II and retired Pope Benedict XVI, the cardinal also spent almost 27 years working in the Apostolic Signature, the church's highest court.

In a condolence message, Pope Francis said he remembered "with gratitude" the cardinal's long and dedicated service to the Vatican and the church, particularly his tenure teaching canon law at Rome's Pontifical Gregorian University and Lateran University.

In every role he had, Cardinal Grocholewski served with "priestly zeal, faithfulness to the Gospel and (for) the edification of the church," the pope wrote.

Cardinal Angelo Sodano, vice dean of the College of Cardinals, was to celebrate Cardinal Grocholewski's funeral Mass July 18 in St. Peter's Basilica, and Pope Francis was scheduled to preside over the conclusion of the service, known as the final commendation.

Born in Brodki, Poland, Oct. 11, 1939, Cardinal Grocholewski was ordained to the priesthood in 1963. He then spent more than 40 years working at the Vatican when he first started working at the Apostolic Signature in 1972.

He was named secretary of the tribunal in 1982 and head of the court in 1998. The court functions mostly as an appeals court, hearing challenges to previous judgments made by marriage tribunals, Vatican congregations and local bishops.

St. John Paul ordained him a bishop in 1983, gave him the title of archbishop in 1991 and made him a cardinal in 2001.

Cardinal Grocholewski spent almost three decades at the Apostolic Signature before being named head of the education congregation in 1999, where he served under three popes until his retirement in 2015.

In 2015, Pope Francis asked him to join a new board of review within the Congregation for the Doctrine of the Faith. The doctrinal team deals with appeals filed by clergy accused of abuse.

Cardinal Grocholewski's death leaves the College of Cardinals with 221 members, 122 of whom are under the age of 80 and therefore eligible to enter a conclave to elect a new pope.