BRUSSELS — Delphine Boël grew up certain that she should be a princess. Now a court ruling and a DNA test could make it true.

Ms. Boël, 50, is a Belgian visual artist who claims that she was conceived during an extramarital affair between King Albert II of Belgium and Ms. Boël’s mother, Baroness Sybille de Selys Longchamps.

The court ruling, published Monday, gave credence to her claim and ordered Albert to submit DNA evidence to determine whether he is Ms. Boël’s biological father.

Like some countries in Europe, Belgium still has a king who is theoretically above the law, and cannot be arrested, prosecuted or convicted. Protocol stipulates that no one can even ask him a question in public. But the court ruling shows that even a king can be held accountable once he relinquishes the throne — which Albert did in 2013.