NATICK, Mass. — They call it the holy grail of ready-to-eat meals for soldiers: a pizza that can stay on the shelf for as long as three years and still remain good to eat.

Soldiers have been asking for pizza since lightweight individual field rations — known as meals ready to eat, or MREs — replaced canned food in 1981 for soldiers in combat zones or areas where field kitchens cannot be set up.

Researchers at a US military lab in Massachusetts are closing in on a recipe that doesn’t require any refrigeration or freezing.

“You can basically take the pizza, leave it on the counter, packaged, for three years and it’d still be edible,” said Michelle Richardson, a food scientist at the US Army Natick Soldier Research, Development and Engineering Center.

Scientists at the Natick labs also are responsible for developing equipment and clothing that improves soldiers’ combat effectiveness and their survival, but the quest for good pizza has become known as the holy grail there.

Pizza is one of the most requested items when soldiers are asked every year what they’d like to see in their rations, said Richardson, who has spent nearly two years developing the recipe in a large kitchen full of commercial equipment.

Scientists’ efforts were long thwarted because moisture in tomato sauce, cheese and toppings migrated to the dough over time, resulting in soggy pizza that provided the perfect conditions for mold and disease-causing bacteria to grow.

But on-and-off research over the past few years helped them figure out ways to prevent moisture from migrating. That includes using ingredients called humectants — sugar, salt and syrups can do the trick — that bind to water and keep it from getting to the dough.

But that alone would not help the pizza remain fresh for three years at 80 degrees, so scientists tweaked the acidity of the sauce, cheese and dough to make it harder for oxygen and bacteria to thrive. They also added iron filings to the package to absorb any air remaining in the pouch.

How does it taste?

Most soldiers haven’t tried it because it’s still being developed, but Jill Bates, who runs the taste lab, said she was happy after tasting the latest prototype batch of pepperoni. She describes it as a pan pizza, with a crust that’s a little moist and not super-crispy.

“It pretty much tastes just like a typical pan pizza that you would make at home and take out of the oven or the toaster oven,” she said. “The only thing missing from that experience would be it’s not hot when you eat it. It’s room temperature.”

Turkey pepperoni pizza also will be available for soldiers who do not eat pork products.

David Accetta, a former Army lieutenant colonel and spokesman for the lab, tried the pizza and also liked it. He said having food soldiers can relate to and enjoy has added benefits.

“In a lot of cases, when you are cold and tired and hungry, having a hot meal that’s something that you like and you would get at home, it increases your morale — and we consider that to be a force multiplier,” Accetta said.

Spaghetti is the most popular MRE option. It has been on the menu since MREs were introduced, and it is the one thing that soldiers have never recommended be removed from MREs. Vegetarian tortellini is also one of the most popular choices.

The lab brings in food technologists to taste recipes and give feedback.

One of the technologists, Dan Nattress, agreed the pizza deserves a thumbs-up.

“It tastes pretty much what you would get from a pizza parlor,” he said.