For Jews seeking eternal rest, the most coveted real estate on Earth lies in the soil of Jerusalem. Unfortunately, the city is rapidly running out of room to bury the dead.

And so it has come to pass that an Israeli burial organization has teamed with a cutting-edge construction firm to bore deep under a mountain here to create a vast underground necropolis — with ­elevators.

The first phase of the new subterranean city of the dead will include 22,000 crypts, arranged floor to ceiling in three tiers, in a network of intersecting tunnels now being dug through the rocky clay soil beneath Jerusalem’s largest cemetery.

The $50 million project, begun a few months ago and paid for with private funds generated by the sale of burial plots — mostly to Jews overseas — is the first of its kind here in modern times. And it is likely to be the start of a trend.

The last time cave burials were in vogue in Jerusalem was about 2,000 years ago. As readers of the Bible may recall, a Jew named Jesus was interred in a cave, according to belief, though he did not stay long.

Modern catacombs may soon be the preferred option — or the only realistic one, in a delicate balance of economy, space and piety.

The need is dire. Perhaps surprisingly, there are only a handful of Jewish cemeteries in Jerusalem still accepting new arrivals.

Two cemeteries — the Sheikh Badr beside the Supreme Court, another beside the Shaare Zedek hospital — are small and closed to new burials. The private Sanhedria Cemetery in the center of town is almost full (and expensive at $20,000 a plot, according to some Israeli reports).

Mount Herzl is the national cemetery of Israel — but it is reserved for Jewish notables, Israeli leaders, armed forces and those who sacrificed their lives for the nation. So it may be tough to get your nana from Boca Raton in.

There is the Mount of Olives, of course, just east of the Old City. At 3,000 years old, it is the most famous and most profound, has the best views and is especially desired for its prime location: Jewish tradition says that when the Messiah comes, the resurrection of the dead will begin there.

There are complications, however. The Mount of Olives is located in contested East Jerusalem, which the Palestinians want as the capital of a future state. Security can be heavy-handed or spotty, especially during times of heightened tensions. Also, vandals have been desecrating Jewish tombs in recent years. Burial directors say the location is not quite as coveted as it had been.

Which leaves Har Hamenuchot, the “Mount of Those Who Are Resting.” It is the city’s largest cemetery, opened in 1951, a sprawling city of stone covering a hilltop on the western edge of Jerusalem and one of the first landmarks a traveler sees while driving into Jerusalem on Highway 1 from Tel Aviv.

The cemetery was the scene of an emotional outpouring this year at the burial of four Jews killed in a January terrorist attack at a kosher market in Paris.

“We need our land for the living and not for the dead,” said Hananya Shachar, director of the Jerusalem Jewish Community Burial Society, who said he first dreamed of digging burial caves 25 years ago, when he saw how quickly demand was outstripping supply. In Israel, nonprofit burial societies manage assigning and selling plots and helping the bereaved plan funerals.

There are about 522,000 Jews living in Jerusalem and 6­ million Jewish Israelis in all. Another 8 million Jews, more or less, live around the world. That is a lot of potential demand. Most observant Jews do not cremate their dead. Burial directors say they will need hundreds of thousands of new plots, niches and vaults to keep up.

If they go subterranean, the possibilities for new spaces are nearly limitless. There are more than 6 million remains in the catacombs of Paris, for example. The Roman catacombs were dug during the 2nd century for the same reason Jerusalemites are burrowing today: They were running out of room.

“Now we’ve got the drilling equipment, the know-how and the means, so we said, ‘Let’s go for it,’ ” Shachar said.

Shachar pointed out that not only do Jews around the world want to be buried in Jerusalem, but also the soil is good for digging, making his dream of caverns doable. In Tel Aviv and in much of the settled coastal lands, it is not possible; you hit water within a couple dozen yards.

At the cemetery on a recent day, Shachar showed how overcrowding is driving new solutions. The burial society is clearly running out of space for “field graves,” the traditional plots side by side on the mountaintop. “Those are finished,” he said.

Rabbis who specialize in Jewish burial law approved in years past the use of aboveground vaults — as long as proper rites and customs were followed, earth surrounded and touched the crypt, and the vaults were connected to the land. The aboveground niches were soon surpassed by a newer solution: Six-story stacked terraces that resemble landscaped parking spots — not for Hyundais and Mazdas, but for Uncle Moshe and Aunt Talia. These terraces are also connected to the earth.

Shmuelik Glaser, a partner in the project who works for Rolzur Tunneling, took visitors into the first tunnels, wide enough to accommodate a couple of ­tractor-trailers roaring down a highway.

One of his digging machines was idle as a welder replaced gnarled steel bits on the drill. The electric, Austrian-made borer is a beast with a brain — guided by onboard computers that navigate along laser-guided lines, in part because once it starts digging, there is so much dust in the tunnel a worker cannot see his hand in front of his face.

When the tunnels and crypts are complete, there will be soft lighting, beautiful stonework and an airy, dry, cool and peaceful climate — no dank cave here.

Shachar said most of the plots are free to Jewish Israelis, paid for by their national insurance — though the costs of tombstones, ritual washing and the rabbi are extra. If a spouse wants to lie next to his or her partner, the plot must be reserved and paid for.

Most of the money that supports cemeteries in Jerusalem comes from Jews abroad who want to be buried here. A Jerusalem burial — air transport, rites, plot and tombstone — costs between $5,000 and $10,000.

“This is amazing, nothing like it, at least in the world of Jewish cemeteries,” said David Jacobson, an American in the burial business who came from New York to take a look at the project.

“The future is underground,” agreed Yair Maayan, project manager for the new burial tunnel project. “This is all about how to make better use, smarter use of the land.”

Maayan predicted: “We can fill the 22,000 vaults in seven years.” After that? “We will dig deeper and deeper, all over the mountain.”

Read more:

The Church of the Nativity, Jesus’s birthplace, gets first repairs in more than 500 years

Looters raid Jordanian crypts in search of gold, jewels and artifacts

In expansive Pakistan, Christians struggle to find space for cemeteries

Today’s coverage from Post correspondents around the world