ROME — With the arrest Monday of a Spanish priest for allegedly leaking secret financial documents to journalists, many were surprised to learn that the Vatican has its own criminal justice system — including police, judges, courtrooms, and even jail cells.

Here’s what you need to know.

The Vatican City State, which is about 110 acres, is an independent state — in fact, the smallest internationally recognized independent state in the world by both area and population. The pope is its head, ruling almost like an absolute monarch. The Vatican mints its own euros, prints its own stamps, issues passports and license plates, operates media outlets, has its own flag and anthem, and yes, operates a criminal justice system.

Despite its somewhat medieval look, the Vatican City State technically doesn’t have a prison. It does, however, have four holding cells, each measuring about 12 feet by 12 feet, which authorities prefer to call “secure rooms” that randomly hold minor offenders, such as pickpockets caught at the Vatican Museums.

(Given that about 18 million tourists visit St. Peter’s Basilica, the Square, and the Vatican Museums each year, the place is a haven for petty crime. Per capita, Vatican City has the highest crime rate in the world. In 2006, 472 criminal cases were reported, almost one crime per resident for a country that at the time had only 492 inhabitants.)

The last time all four cells were full was in 1971, when four employees of the Vatican’s telephone exchange were accused of stealing from the papal apartments.

Famously, it was also in one of these cells where Paolo Gabriele, the former papal butler eventually convicted for being at the heart of the Vatileaks affair under Pope Benedict XVI, was initially detained.

The holding cells fall under the responsibility of the Corps of Gendarmes of Vatican City State, also known as the “gendarmeria,” a 130-person body that is responsible for border control, crime prevention and investigation, and the enforcement of financial and commercial regulations, according to its website.

In order to face the Vatican’s version of criminal justice, one either must be a citizen of the Vatican City State or be accused of committing a crime on its territory.

When it comes to the authority for making arrests, the gendarmeria depends on the Vatican’s Promoter of Justice office, currently headed by Italian layman Gian Piero Milano, a lawyer and professor of Church law at a Roman university. He was appointed by Pope Francis in 2013.

If a tourist manages to sneak into the Vatican’s grocery store, for example, and is caught stealing a bottle of wine, he could be questioned by the promoter of justice and taken into custody by the gendarmes.

Most recently, Milano and the gendarmes turned their attention to Spanish Monsignor Lucio Angel Vallejo Balda and Italian laywoman Francesca Chaouqui, who were brought into the Vatican for questioning last Saturday.

Both former members of a study commission created by Pope Francis to plan the reform of Vatican finances, Vallejo and Chaouqui are suspected of stealing confidential commission documents and releasing them to Italian journalists Emiliano Fittipaldi and Gianluigi Nuzzi for use in new books on Vatican money scandals.

According to Law 9 of the Vatican City State, stealing private documents is a felony punishable by up to eight years in prison, under the heading of “crimes against the security of the state.”

Chaouqui was released, and she has since asserted her innocence.

On her Facebook page she wrote, “I have never betrayed the pope, I have never given a sheet of paper to anyone. [The truth] will emerge soon and I have certainty and total trust in the investigators.”

Vallejo, meanwhile, was arrested and is being held in the same cell as Benedict’s butler three years ago.

When a suspect is called in, he or she is interviewed behind closed doors in a process in which defense lawyers have no right to speak, although suspects can confer with them or refuse to answer a question.

A suspect considered a flight risk can be held in custody for up to 50 days, renewable for an additional 50 days in difficult cases, while awaiting trial.

When the modern Vatican City was founded in 1929, a result of the Lateran Treaty, Pope Pius XI decided it would be easier to adopt Italian criminal laws and procedures than to create his own version. Hence, the Vatican’s judicial system is highly similar to Italy’s, although it has since adopted its own laws and amendments.

The Vatican’s promoter of justice, for example, has the authority to bring accused criminals before a giudice unico, or lone trial court judge. Convicted parties can appeal to a three-judge tribunal, and ultimately to the Supreme Court of Appeals.

Accused criminals have the right to a public defender or a lawyer of their own choice.

If convicted, an inmate might serve time in one of the Vatican cells, as would have been the case for Gabrielle if Benedict hadn’t pardoned him. More commonly, long sentences are served at an Italian prison, with the Vatican footing the bill.

Of course, the pope has the power to overrule any court decision.

With the Vatican lacking a long-term prison, most convictions result in fines rather than confinement.

And because the Vatican’s justice system has so little experience with serious offenses, pontiffs have occasionally allowed Italian courts to rule in its cases. That was the case, for instance, in 1981, when Italian prosecutors handled the prosecution of Turkish citizen Mehmet Ali Ağca for his assassination attempt against Pope John Paul II.

In 2012, the papal butler’s criminal trial took just four days before he was sentenced to 18 months behind bars, in large part because he didn’t dispute the main charges, but instead insisted he had acted in good faith.

There was a year’s delay between indictment and trial, however, in part to allow for evaluations of his mental health and competence to proceed.