This article is adapted from Alan Durning’s new book, Unlocking Home: Three Keys to Affordable Communities.

“[A] good hotel room of 150 square feet—dry space, perhaps with a bath or a room sink, cold and sometimes hot water, enough electric service to run a [light] bulb and a television, central heat, and access to telephones and other services—constitutes a living unit mechanically more luxuriant than those lived in by a third to a half of the population of the earth.”

—Paul Groth in Living Downtown: The History of Residential Hotels in the United States.

Most Americans live in houses or apartments that they own or rent. But a century ago, other less expensive choices were just as common: renting space in families’ homes, for example, or living in residential hotels, which once ranged from live-in palace hotels for the business elite to bunkhouses for day laborers. Working-class rooming houses, with small private bedrooms and shared bathrooms down the hall, were particularly numerous, forming the foundation of affordable housing in North American cities. Misguided laws and regulations almost wiped out these other kinds of housing, with disastrous consequences, but now there’s a chance for them to come back, helping those who are young, single, or on the lower rungs of our increasingly unequal society.

In the early decades of the 20th century, rooming houses offered affordable housing for America’s urban working class. Some offered boarding, with a kitchen and dining hall in the basement. In San Francisco a century ago, a passable room might cost 35 cents a night ($8 in today’s currency). Concentrated near downtowns, rooming houses and other forms of residential hotels provided quintessentially urban living. The dense mixture of accommodations with affordable eateries, laundries, billiard halls, saloons, and other retail establishments made life convenient on foot and on slim budgets.

The past century of rising affluence started the decline of the rooming house. With higher incomes, we bought more space and privacy. Young, upwardly mobile, enterprising residents moved out of hotels, depriving hotel districts of their best customers. Those left behind were harder to employ, poorer, on the wrong side of the law, or simply eccentric. This trend accelerated in the 1960s and 1970s, when authorities deinstitutionalized many people with mental illnesses and began sheltering them in rooming houses and other cheap hotels. In most cases, mental health authorities intended such arrangements to be temporary. Some planned to build and support constellations of small, neighborhood-based care facilities, for example, but not-in-my-backyard politics intervened. The care facilities never got built, and some of society’s most vulnerable were stranded in rooming houses, which by then had come to be known as single-room occupancy hotels (SROs).

Meanwhile, new state and local laws made residential hotels more expensive to operate. Other rules simply made them illegal outside of historic downtowns. As cities expanded outward, rooming houses could not spread to the new neighborhoods.

The rules were not accidents. Real-estate owners eager to minimize risk and maximize property values worked to keep housing for poor people away from their investments. Sometimes they worked hand-in-glove with well-meaning reformers who were intent on ensuring decent housing for all. Decent housing, in practice, meant housing that not only provided physical safety and hygiene but also approximated what middle-class families expected.

This coalition of the self-interested and the well-meaning effectively boxed in and shut down rooming houses, and it erected barriers to in-home boarding, too. Over more than a century, it acted through federal, state, and local rules in ways that sounded reasonable at the time: occupancy limits and requirements for private bathrooms, kitchens, and parking spaces. The net effect, however, was to essentially ban affordable private-sector urban housing for those at the bottom of the pay scale.

The rules often imposed middle-class standards that were beyond the means of the working class. In the late 19th century, for example, California—the West’s trendsetter in housing law—began enforcing a rule ostensibly intended to slow the spread of disease. It dictated a minimum quantity of indoor space per person, on the assumption that living in close quarters is a major determinant of disease. (This assumption is dubious, it turns out.)

Under the California standard, you might expect sweeping changes in many kinds of crowded residential buildings: military barracks, college dormitories, summer camps, prisons, single-family homes with many children, lumber camps, and crew quarters aboard ships. But the rule did not apply to these categories of housing. It applied only in neighborhoods where Chinese immigrants lived. Wearing the mask of public health, the policy raised the cost of housing for Chinese families and pushed them farther from California’s whites. It was racism in public-health garb.

In 1909, San Francisco banned most cubicle-style hotels, which were a common form of cheap lodging for itinerant workers and others on exceptionally tight budgets. The city rationalized the policy as a fire-safety precaution. Had fire safety actually been the goal, the city would have demanded fire escapes, fire-slowing walls at certain intervals, and fire doors.

In the following decade, California began regulating rooming houses and other hotels, setting standards for bathrooms (one per 10 bedrooms), window area per room, floor space per room, and more. Again, some of these rules may have had health benefits, and the rules’ proponents certainly thought they were helping. Yet they knocked the cheapest rooms off the market without providing substitutes. Over time, building and health codes demanded ever larger rooms and more bathrooms. They, like codes for other types of housing, also mandated legitimate safety standards such as more exits, better fire-protection features, and ratproof food storage in kitchens. Other jurisdictions followed California’s lead.

Zoning gave city leaders a whole new weapon for separating the laboring class from the “better classes.” After a U.S. Supreme Court ruling in 1926 recognized states’ power to authorize local land-use planning, city planners quickly trapped residential hotels in the oldest parts of town—the parts built before zoning separated shops, restaurants, and bars from dwellings. Sometimes they banned rooming houses and other hotels outright in apartment districts; other times, they simply made them impractical by forbidding the dense mixture of retail establishments necessary to support their residents. And by setting aside vast areas of every city for single-family houses on private lots, they drastically curtailed the land available for all forms of less expensive multiunit residences, whether apartments or residential hotels.

Over the next three decades, codes and federal lending programs increasingly discriminated against residential hotels by defining a housing unit as necessarily possessing both a private bath and a kitchen. They also hogtied hotel districts: Often, racially discriminatory redlining prevented investment even where zoning didn’t prevent operation.

Mandatory off-street parking rules added insult to injury beginning around midcentury. These land-use rules, which typically required at least one parking space per unit, made multiunit housing radically more expensive to build and operate. Rooming-house units were typically no larger than parking spaces to begin with, so a new rooming house might be required to provide as much floor space for cars as it did for residents, even though many rooming-house dwellers did not own cars.

In the 1960s, “urban renewal” became the watchword of North American policy on cities. On the ground, it commonly meant leveling residential hotels and the mixed districts that surrounded them, then constructing single-use neighborhoods of one- and two-bedroom apartments. It was housing, but it was too big and expensive for members of the class that had made rooming houses their homes. In the years since, most cities have gradually closed many of their remaining SROs.

The number of cheap rooms for rent is a fraction of what it once was in American cities. In downtown Portland, Ore., for example, the number of units available to rent for the amount that a minimum-wage worker can afford ($458 per month in 2012) fell from 4,500 in 1994 to 3,200 in 2012, according to the Northwest Pilot Project, a housing provider for seniors. These quarters are almost all subsidized and often have long waiting lists.

Publicly supported low-income housing has emerged but nowhere in the quantities needed to fill the gap. The private housing market could do much more to provide living spaces affordably if we discarded those requirements that merely protect others’ property values by outlawing rooming houses and other simple housing options.

Historically, the bottom of the scale for inexpensive housing was not the rooming house but the flophouse—essentially a hall of bunks or sleeping slabs. Aside from homeless shelters, North America no longer has flophouses. A century of regulation shut them down. But in Japan, they live on in modern form in “capsule hotels,” which rent enclosed sleeping spaces by the hour or the night. In one $30-a-night Tokyo hotel, the sleeping capsules are stacked in pairs and are just big enough for a single mattress. Yet they each offer air conditioning, a radio and mini TV, a reading light, and a privacy screen. Guests share bathrooms, showers, a lounge, restaurant, and bar.

In most American cities, such 21st-century flophouses would be illegal on any number of grounds. The “rooms” are much too small: Habitable rooms may not be smaller than 7 feet by 7 feet in Seattle, for example; sleeping rooms must be bigger still. The hotels do not provide off-street parking for each room, and some do not have enough bathrooms to satisfy codes, which typically require one bathroom per eight units. The “rooms” themselves—the capsules—are code enforcers’ nightmares: Among other things, they lack the windows, fire-safe doors, smoke detectors, and closets required of each legal bedroom. If regulated as dormitories (bunkhouses) rather than as separate bedrooms, meanwhile, they would violate other rules: They lack the requisite unencumbered floor space, for example.

Yet Japan has many such hotels, and its fire-safety record is better than that of the United States. Throngs of travelers and city workers stay in the capsule hotels, appreciating the low prices and clean, safe, convenient accommodations. They are cheap, too, at least by Japan’s stratospheric real-estate standards. Even in the Northwest, a bed for $30 a night would be cheaper than a taxi home for some Saturday night pub crawlers. And capsule hotels operate at a profit, without public subsidy, filling one of many niches in Japan’s housing market.

Imagine a continuum of such choices, extending downward from today’s studio apartments. Along this continuum, we’d have complete studios smaller than those currently permitted, followed by tiny units with private baths but without full kitchens, then updated rooming houses with shared baths and kitchens, then capsule hotels. A few brave developers have been trying to reverse a century of policies on a small scale by building neo-SROs and microapartments in cities. They’re responding to the strong demand, especially among millennials, for small, inexpensive units in popular, pedestrian-oriented neighborhoods such as Seattle’s Capitol Hill and Portland’s Pearl District.

One example is the aPodment, a product of Calhoun Properties of Seattle. These buildings are updated rooming houses. Each unit is lightly furnished and has a microwave and a minifridge plus a petite bathroom, compactly arranged in 150 to 200 square feet. Off-street parking is minimal and is rented separately, but the buildings have shared kitchens and laundry facilities. In early 2013, rents commonly began around $550 per month, including Internet and all utilities. At about $18 per night, aPodments rent for roughly double what San Francisco rooming houses cost a century ago, adjusted for inflation. Unlike their historic antecedents, aPodments have private baths and kitchenettes.

In five years, Calhoun and its partners have built more than 400 units at 12 sites on Seattle’s Capitol Hill and in the University District. Occupancy is reportedly near 100 percent, because the price is far below that of studio apartments nearby. For many of these projects, Calhoun has avoided design review and other regulations on congregate housing by keeping the developments small and, legally speaking, townhouses rather than rooming houses. In these projects, each townhouse has eight or fewer bedrooms to fit inside Seattle’s eight-person-per-dwelling-unit occupancy limit. And Seattle’s parking requirement for a single townhouse is one off-street slot, so the parking burden is light.

Calhoun isn’t the only developer shrinking its ambitions to the dimensions of what the English call “bedsits.” In the six years before 2013, the city of Seattle permitted 48 microhousing buildings, with some 2,100 diminutive apartments between them. That’s a bigger number than at any time in decades, but it’s still a small share of residential development.

Many neighbors are supportive; many are not. Supporters speak for more housing choice for entry-level workers and call opponents elitists or NIMBYs. Opponents fear that “sketchy people” will live in such small units. They also complain about the extra cars they believe will compete for curb parking. In Vancouver, British Columbia, a microloft project has renovated an old SRO into 30 carefully designed studios averaging 250 square feet each and renting for about Canadian $850 (U.S $816) a month, including utilities. In Portland, one new building offers 150 units of about 300 square feet each in the trendy and spendy Pearl District at around $850 a month. Demand for very small units has been strong in Portland, pushing up rents for studio apartments by about 30 percent over the past two years. New York is considering reducing its minimum-square-footage rules to allow microstudios. Similarly, San Francisco recently authorized a trial run of up to 375 new apartments as small as 220 square feet.

In part, developers’ interest in small units is a response to the demographics of renters, many of whom are millennials, a generation with modest incomes and decidedly urban tastes. More than previous generations, they are delaying marriage and childbearing and prefer compact, walkable, culturally interesting places with European-style “café cultures.” That’s the analysis of Seattle urbanist Mark Hinshaw and his co-author, Brianna Holan. In the American Planning Association’s journal, they argue that small, centrally located apartments priced under $850 a month are exactly what many millennials want.

Will new ministudios at $850 per month help people who can afford only half that amount? Actually, they may. In the short run, new units free up older units, which helps to free up still older units, and so on down the economic ladder in a process that housing economists call “filtering.” In the long run, new housing turns into used housing. Just as people with less money drive older cars, they also live in older buildings. So new units occupied by baristas and graduate students today may become old units occupied by immigrant dishwashers in a couple of decades. Old-school rooming houses served both upwardly mobile young people and middle-aged working-class singles. The new generation of this housing can, too.