A Berlin museum said it had formally restituted a 15th century religious wooden sculpture to the heirs of former owners, a Jewish couple who fled the Nazi regime.

The heirs in turn agreed to sell back the medieval artifact, “Three Angels with the Christ Child,” at an undisclosed price to the Bode Museum.

The agreement meant “righting an injustice,” said the head of Berlin’s public museums, Michael Eissenhauer, who thanked the heirs for the “grand gesture” that will keep the priceless piece on public display.

It once belonged to the private collection of Ernst Saulmann, a Jewish industrialist, and his wife Agathe, one of the few female pilots of her era. As Adolf Hitler’s thugs stepped up their campaign to terrorize Jews, the couple fled Nazi repression in late 1935, initially for Italy.

The Nazis confiscated their wealth, including their land and business, a mechanized cotton mill, as well as their private library, art collection and Agathe’s plane.

The couple were interned in France in Camp Gurs, where Ernst Saulmann’s health severely deteriorated. He died a year after the war ended, in 1946.

Agathe, having suffered depression after the horrors she endured, committed suicide in 1951.

In recent years, their descendants hired researchers who managed to locate 11 of the art objects, which had ended up in five German museums and three private collections abroad.