Many of Portugal’s pastries trace their origins to the country’s once-vast network of convents and monasteries. According to legend, the religious centers used egg whites to starch their laundry, and had to come up with a use for all the excess yolks.

Different regions came up with special variations on the pastéis de nata. To this day, the Lisbon area is known for its version of the circular custard tarts.

One bakery in particular has a claim to fame: It's the home of the original pastéis de nata recipe created in the local Jerónimos Monastery. Pastéis de Belém has operated continuously in the same storefront since 1837, churning out the tiny, rich delicacies.

And the recipe is still a closely guarded secret.

A decade ago, the owner of Pastéis de Belem sat down Carlos Martins and told him he was to become one of three chefs entrusted with the secret recipe, replacing another baker who wanted to retire after 60 years on the job.

“He told me I was one of the chosen ones to find out about the secret. I was very happy, of course,” Martins says.

The secret recipe for pastéis de nata originated in the massive stone Jerónimos Monastery. It was an important monastery during the Portuguese age of discovery, when the monks prayed for sailors.

Emma Jacobs

You could say Martins had earned it: He'd worked at the bakery since he was 14, trained in the craft by his predecessor. Now, every morning, he gets up and goes to work in a room behind a metal door marked “secret.” There, he and two other specially initiated bakers make enough dough and custard for 20,000 pastries a day.

The three can never travel together.

“Not because we're afraid that the plane crashes. It's because we need someone here because we never close,” explains Manuel Clarinha, who along with his cousin is the fifth generation of his family running Pastéis de Belem.

Clarinha says the secret recipe originated in the massive stone Jerónimos Monastery down the street. It was an important monastery during the Portuguese age of discovery, when the monks prayed for sailors.

A businessman bought the recipe from the Jerónimos monks and later sold it to Clarinha’s family, which has made pastéis de nata here ever since.

“The recipe is not only emotional. It's also a part of us,” he observes. “It's part of this company's identity. So of course if somebody else were to come here and say 'I know the recipe' I would be like, 'Oh no, OK, we have to hire you or put you in a basement or something.'”

After the three chefs combine the ingredients behind the metal door, the pastries get assembled by a large staff. Women shape each pastry crust by hand.

The custard bubbles as the pastries cook at 750 degrees. Once cool, they’re served to customers who line up outside the door.

Customers line up at Pastéis de Belém. The clientele includes a growing number of tourists but is still about 60% local.

Emma Jacobs

Besides Portuguese, those in line can be heard speaking French, German, Italian, Spanish and English.

Clare Cowey has come from Scotland to visit friends who live in southern Portugal's Algarve region. She says she’s tried to make this type of pastry herself at home, but the results hardly compare.

“I tried it but it were no use. I can’t get this custard at all,” says Cowey. “This is just wonderful. This is one of the most important sites to visit.”

Pastéis de Belém gets a lot more visitors these days than it used to. Tourism is up all over Lisbon, partly because of investments in tourism infrastructure, and also because many European tourists are avoiding other warm-weather destinations over terrorism concerns.

As long as the tourists keep coming, demand for this singular pastry could even outlast the family that’s run this bakery for so many generations.

“I don't know if someday my cousin or my sons will pick up the business directly or not, but it has never been imposed, it has always been optional,” Clarinha says. “I guess for now I'm happy and we'll see how it goes.”

Correction: A headline in a previous version of this story misstated the number of people who have the recipe to a Portuguese pastry. Three chefs have the recipe, as does the family that owns the bakery.

From PRI's The World ©2016 PRI