Jerusalem — As a present-day resident of Jerusalem it’s difficult for me to imagine that the city was once considered a pathetic little backwater of a place. When Mark Twain visited here in 1867, the writer noted that “a fast walker could go outside the walls of Jerusalem and walk entirely around the city in an hour. I do not know how else to make one understand how small it is.”

I suppose Twain had envisioned Jerusalem as a grand city based on the number of pilgrims who traveled thousands of miles to visit it, and not a downtrodden little town. When I drive up to Jerusalem I sometimes wonder what Twain and Zionist leaders like Theodor Herzl and David Ben-Gurion would think of today’s Jerusalem, which now has 800,000 residents, 150,000 more than Boston, for example.

Would they marvel at the new high-rises that dot the creamy stone skyline, the sparkling malls and the trendy new restaurants in the suddenly hip Mahane Yehuda market? Or would they frown at the urban sprawl and the huge gap between those who live in squalor and those who spend $2 million or more for a flat they occupy only twice a year, on Passover and Sukkot.

What would they think of the municipality’s efforts to transform the western, Jewish side of the city into a metropolis while (unofficially) refusing to enlarge and develop the eastern Arab neighborhoods?

“No political entity will admit it’s doing anything deliberate to prevent development in east Jerusalem,” says Elan Ezrachi, an educational consultant and author of “Awakened Dream: 50 Years of Complex Unification of Jerusalem” (currently only in Hebrew). But the lack of municipal plans for Arab Jerusalem and the refusal to issue building permits in the Arab sector “is a vicious cycle,” he says.

In the Jewish sector, by contrast, officials are actively encouraging the creation of tens of thousands of apartments to stem the annual exodus of mostly young Jerusalemites eager to purchase homes but unable to afford Jerusalem’s high prices.

Fleur Hassen-Nahoum, who leads the opposition in the Jerusalem City Council, says the rush to build more homes is pitting the need to address the housing shortage against the desire to preserve the city’s unique architecture and character. “The city is in the midst of an urban renewal process in certain parts,” she notes. “There isn’t enough supply for demand. Young couples miss out and leave the city. In polls, housing is always one of the top reasons they leave.”

One cause of the housing shortage is the lack of land to build on. Much of the city’s land is owned by various Christian churches, and in some parts of the city residents can’t sell their apartments because they were built on church land, where leasing arrangements will expire within 30 years. With so little land, new buildings are going vertical rather than horizontal, and that’s transforming the skyline.

For the past several years Mayor Nir Barkat has been permitting developers to build several high-rises in downtown Jerusalem; recently approved plans to tear down decades-old “shikunim” — shoddy buildings built in the 1950s and ’60s to house Jewish immigrants living in ma’abarot — tent-and-shed cities.

In south and west Jerusalem, along the light rail train tracks slated for these neighborhoods, several of these buildings will be demolished and new buildings (with more upscale apartments to suit the current tenants) could reach 40 stories, Hassen-Nahoum says. Similar projects are slated for the western part of the city.

Ezrachi thinks high-rise construction will be a good way to bring relatively affordable housing back to Jerusalem. “It’s good because it allows the municipality to demolish old, inadequate housing projects, and will allow tenants to return to their homes for the long-term.” The down side, Ezrachi says, is that the longtime residents, who tend to be poor, may no longer be able to afford the upkeep of a building with several elevators, gardens and other amenities.

“It pushes them out of the neighborhood softly,” he acknowledges.

Hassen-Nahoum agrees that gentrification via urban renewal is a mixed blessing.

“Gentrification is taking place in neighborhoods that up until now were working-class. Young couples move in because they can afford homes. It’s happening now in Armon HaNatziv,” an east Jerusalem Jewish neighborhood, “and it happened 30 years ago in Baka,” a south Jerusalem neighborhood that was upscale until the Arabs who owned the homes fled in 1948 and the Israeli government housed Jewish refugees in the abandoned homes or hastily built shikunim.

Today, Baka’s shikunim are being spruced up via a national program called Tama 38, which allows developers to build additional floors onto the roof of a building without having to pay for land. In return the developers strengthen old buildings against earthquakes, enlarge the existing apartments, build elevators and reface the buildings with attractive Jerusalem stone.

While Tama 38 usually doubles or even triples the value of the properties, there is no law requiring developers to pay owners’ rent during the one-and-a-half to two years it takes to complete construction, and many owners have no choice but to live in a construction site.

On the positive side, Hassen-Nahoum says, a neighborhood’s gentrification can be a wonderful thing for older, financially struggling owners who can finally sell their homes at a huge profit and move closer to their grown children.

Whether my children, who are teenagers, will be able to afford to live in Jerusalem when they’re older remains to be seen.

Although the increase in the number of apartments should, in theory, bring down prices, the high birthrate in Jerusalem, where even many secular families may have four children, means that the demand will always far outstrip the supply.

The only real affordable housing on the horizon may be in the form of student rental housing — studio apartments for university students and possibly other young people who want to remain in the city but can’t afford $1,000 and up in monthly rent.

Despite the challenges facing Jerusalem, Hassen-Nahoum remains hopeful. “Jerusalem will be very different in 10 to 20 years,” she said optimistically.

Let’s hope different means better.