Depicting the reading of the fortune of the baby Jesus, the painting by Josefa de Ayalla, commonly known as Josefa de Óbidos, is said by specialists to be "a masterpiece for [its] quality and rare iconography”.

Joaquim Caetano, director of the MNAA and art historian, told Lusa that this small painting is "an extraordinary piece, with a very rare subject".

He revealed that the piece, which was acquired at an auction in Germany in June by the Argentina-based collector and gallerist Jaime Eguiguren, is to be ceded for display for one month in the Lisbon museum.

"We were contacted by the collector, saying he had the piece, and he wanted to get an opinion from the museum,” Caetano said. “At the time, in the exchange of emails, I said that we would really like to show it in the MNAA."

He admitted to being surprised that Eguiguren immediately accepted the idea.

The coming to Portugal of this small-scale devotional painting – which until know has been totally unknown to specialists - arises in a particular context, which has to do with the fact that the piece, which is still in Germany, was only to be sent to the US after a month.

"In these circumstances, the collector made the work available in Lisbon for a month," said Caetano, who has already organised two sessions to talk about the painting, one on Friday at 6pm, the date of the inauguration, and another on 3 October, at the same time.

The work was sold in June for €220,000 at an auction in Bonn. At the time, the Portuguese state did try to buy it for the MNAA, but without success, because the value exceeded the funds available for the purpose.

The painting, which was sold at the Plückbaum auction house, with a reserve figure of €25,000, measures 23 by 29 cm. It was painted on copper plate and depicts the Virgin Mary with Jesus on her lap, being greeted by other women with children, while a gypsy takes the baby’s hand to read his fortune.

The scene takes place during the stay of Jesus’s family in Egypt; the association between that country and gypsies was common at the time and depicted in engravings and paintings in Portugal and Spain.

Caetano told Lusa that the piece was much in demand at the auction, which was attended by Portuguese and foreign collectors, as well as museums, before it was secured by Eguiguren, who has several galleries, including in Europe and the US.

The painting is thought to have changed hands outside Portugal in the 1980s but was only known to the public when it emerged at this auction in Germany. Caetano has previously been conservatist at the MNAA and was one of the commissioners for a 2015 show there dedicated to Josefa de Óbidos and her relation to the Portuguese Baroque.

He believes there other unknown works by the artist may well come onto the market, "especially since, with gender issues currently in focus, the fact that it is a woman artist of great talent of the Baroque period [means that] her work will be more valued."

Josefa de Óbidos was born in Seville in 1630 and died in Óbidos in 1684. She learned her trade from his father, Baltazar Gomes Figueira, in whose workshop she worked, and received a religious education at the Convent of Santa Ana in Coimbra between 1644 and 1646, in which year she went to live in Óbidos.

There are works by her in the Louvre Museum in Paris and the Walters Art Museum in Baltimore, in the US, as well in the MNAA and in museums in Porto, Coimbra, Guimarães and Évora.

The first known exhibition with works by Josefa de Óbidos was in the late 1940s at the MNAA, in which all of her paintings in its collection were displayed.