HANDOUT - This illustration shows the types of "missing middle" housing that urban planners say could provide more affordable options for millennials as they begin to hit their mid-30s, couple up, start families, and look for more space or privacy than their apartment or group house provides. Some planners, employers and developers have become concerned that the millennials who rejuvenated the District and other cities will be priced out once they try to buy a home. (Opticos Design, Inc.) (N/A/Opticos Design, Inc.)

Cities and close-in suburbs looking to the future see a troubling trend: The millennials who rejuvenated their downtowns over the past decade are growing older and beginning to leave.

The oldest are hitting their mid-30s, with many starting to couple up and have children. Meanwhile, the sleek high-rise apartment buildings built for them as single young professionals are no longer practical or affordable as they seek to buy homes with more space and ­privacy.

“There’s been this huge wave of people in cities all over the country. Then they grow up. Then what?,” said Yolanda Cole, who owns a D.C. architectural firm and chairs ULI Washington, part of the Urban Land Institute, a research organization dedicated to responsible land use.

In an effort to retain these residents, some urban planners, developers and architects are reviving the kinds of homes that might be more familiar to millennials’ great-grandparents: duplexes, triplexes, bungalows, rowhouses with multiple units, and small buildings with four to six apartments or condos.

It’s the kind of housing that fell out of fashion after World War II, when young families and others fled cities for the houses, driveways and ample yards of the burgeoning suburbs. Planners and architects refer to it as the “missing middle.” It hits the middle in scale — larger than a typical detached single-family home but smaller than a mid- or high-rise — and typically serves people with middle-class incomes.

Daniel Parolek, an architect based in Berkeley, Calif., who coined the term in 2010, said the need for more missing middle housing is hardly limited to millennials. But as they grow older, he said, questions have been raised about how cities will continue to evolve if many of the generation are priced out once they want to put down roots.

“In particular with this generation, that played an important role in revitalizing cities,” Parolek said, “I think keeping them in cities is a major conversation.”

Washington residents Matthew Horn, 32, and his wife, Ana Bilbao Horn, 32, are struggling to stay in the city now that they want to buy. They love their neighborhood near Union Market in Northeast Washington, Matthew Horn said, but their one-bedroom apartment feels tight now that their 6-month-old daughter sleeps in a crib just off the living room.

Rowhouses with at least two bedrooms are either “extreme fixer-uppers” or out of their price range. Horn, an architect, said being able to buy a home in a safe neighborhood and with a small yard for his daughter feels impossible.

“Right now I’m having to come to terms with having to move out of the city,” he said. “I’m realizing the things I want to provide for her, we won’t be able to afford in D.C.”

In the District, about 35 percent o f the housing stock — mostly rowhouses and apartment buildings with two to four units — qualifies as missing middle, planners say. But many of the rowhouses have been carved up into smaller units, shrinking the supply of larger homes and sending prices soaring just as older millennials began seeking them out. Several years ago, in part to preserve larger homes for millennials trying to remain in D.C., the city began limiting when rowhouses could be divided into more than three units.

“We’re starting to research where and how we can encourage more of the missing middle,” said Art Rodgers, senior housing planner for the D.C. Office of Planning. “I think urban areas in general have to make tough choices between maximizing land capacity and maintaining this housing supply.”

Fred Selden, planning director for Fairfax County in the Northern Virginia suburbs, said he hasn’t seen an exodus of millennials from the county’s more urban areas. But he senses the uncertainty in his profession.

“You read the literature, and it’s all over the place,” Selden said. “We’re trying to figure out what will drive this younger generation. Will they follow the same patterns of their predecessors, or will they do something ­different?”

Cities from Des Moines to Atlanta to Nashville are turning to the missing middle as a way to try to hold on to millennials as they age. Rather than requiring or subsidizing it as they typically do to produce more low-income housing, local governments are trying to encourage developers to build more missing middle housing by removing barriers in zoning laws and building codes.

Some cities have rezoned their single-family neighborhoods to allow duplexes, triplexes and other multiunit structures that look like single-family homes from the outside, particularly in areas near transit lines. To allow more homes per lot, others are considering relaxing requirements on yard sizes and setbacks, the distance required between properties. Some are beginning to allow bungalows clustered around courtyards by changing long-standing requirements that front entrances be on a street.

“[Millennials] said ‘We don’t want big yards, but we don’t want to be in a big apartment building. We want a duplex or a triplex or townhouse,’ ” said Lee Jones, a city planner in Nashville, which has made similar changes. “They want something close to work and coffee shops, but they don’t want to take care of a yard.”

A big question is what sales prices will be considered “affordable” by for-profit builders, particularly in areas where land values have skyrocketed. Another potential hurdle: opposition from residents who say their neighborhoods and schools can’t absorb the additional traffic, parking and children that higher-density housing brings.

Of course, planners say, providing more missing middle housing in walkable neighborhoods near transit serves home buyers of all ages, including the other demographic giant of empty-nest baby boomers looking to downsize.

M. Leanne Lachman, a real estate consultant who conducted a 2015 study of “Millennials Inside the Beltway” for ULI Washington, said some of the angst is overblown. Only about one-third of millennials live in cities, she said, compared to the two-thirds in suburbs and rural areas.

For those who leave, she said, there are plenty of younger ones coming after them to keep urban areas feeling vital and vibrant.

“You always need more affordable housing in metropolitan areas,” Lachman said. “But I don’t think it’s required specifically for millennials.”

Even so, some planners say millennials’ sheer numbers — they recently surpassed baby boomers as the largest living American generation — will force developers to provide more of the missing middle.

“It’s a huge wave,” said Gil Kelley, planning director for Vancouver, B.C. “They’re demanding a place in the cities and housing that’s affordable to them.”

Vancouver, which ranks among the most expensive cities in North America, has begun to allow more duplexes and “stacked” townhouses with two units.

“I think it’s very significant that we’re understanding people want to live in the core of urban areas again,” Kelley said. “We’re reversing a 60- to 70-year trend of people moving out to suburbs . . . This is not just a fad for a decade. This is a multi-decade shift.”

Experts say it’s too early to know how many urban millennials will try to stay versus follow the well-worn path to the suburbs once they have school-age children. The ULI Washington study found nearly two-thirds of those 30 and older said they planned to continue living inside the ­Beltway in the next three years. But nearly half of that age group also didn’t have children and didn’t expect to in that time. The survey also found 58 percent of millennial renters believed they would need to move outside the Beltway to buy a home.

Developers say they are aware that, unlike their parents and grandparents, many millennials don’t want to move to the suburbs and “drive ’til you qualify.” They say the fact that many have shared group houses or lived in micro-units and other small apartments as young singles shows they’re willing to trade space to live near transit and in walking distance to restaurants, shopping, parks and other­ ­amenities.

Some developers are planning townhouse projects that will squeeze as many as twice the number of homes onto the same tracts of land as traditional developments, often by shrinking bedrooms, tucking parking underneath and providing shared patios rather than private yards. Doubling the number of homes, they say, can cut prices in half.

Planners in some urbanized suburbs say they, too, are exploring ways to provide more missing middle housing in walkable areas near transit — not only to hold on to millennials but to ensure more of those heading their way don’t add to traffic congestion.

Gwen Wright, planning director for Montgomery County, said more homes in the missing middle would serve as a transition needed between the high-rises of growing downtowns like Bethesda and surrounding neighborhoods of single-family houses. Home buyers of all ages need more options in a county where a starter home can command up to $900,000, she said.

“I think we can provide what millennials are looking for — being close to transit-oriented areas but having the same benefits of a single-family house, even if not in a traditional sense with the yard and picket fence,” Wright said. “My sense is millennials are looking for more than that half-acre. They’re looking for community and walkability. They’ve gotten used to those” in cities.