HAMPTON, Va. — A pair of nor’easters in early 1998 and Hurricane Isabel in 2003 woke this low-lying Chesapeake Bay town to the impact of rising waters caused by climate change. A few years later, as Hurricane Katrina swamped New Orleans, and Hurricane Sandy raked the New Jersey-New York coastline, scientists warned that Hampton and its neighbors could be next.

So this small city, about the size of Alexandria, embarked on studies of what was happening and what it could do.

Six years later, the city has changed its building codes, razed some houses and elevated others, and is finalizing a plan to address the oft-flooded Newmarket Creek in its densely developed center. In neighborhoods that line the bay, homeowners are taking action, too.

How Hampton copes with rising sea levels could provide lessons for other localities at a critical time: A recent study by the Union of Concerned Scientists predicted that 300,000 existing homes and businesses in the United States will be at risk of chronic, disruptive flooding within the next 30 years.

In the Mid-Atlantic alone, houses in places such as Lewes, Del., Crisfield, Md., and Toms River, N.J. — in addition to Hampton and its neighbors — could be in jeopardy.

“Nobody is underestimating what this is,” said Terry O’Neill, director of community development in Hampton and the lead person shaping the city’s response to sea-level rise. “If you make smart decisions and change the way you think about living with water, you can find solutions.”

Breakwaters and bulldozing

In forming their plans, city leaders gleaned ideas from Dutch engineers who have protected their low-lying country from seawater inundation for centuries, as well as scientific gatherings and community meetings.

They now require first floors of new buildings to be three feet higher than the Federal Emergency Management Agency (FEMA) requirement, and they are considering “no-runoff” pervious pavement for sidewalks and parking lots, which will allow standing water to drain into the soil slowly. The city is working on creating breakwaters in parts of the bay, dredging certain channels and replenishing beaches to make them more resilient to waves.

Hampton’s government bought 18 frequently flooded homes, razed them, and turned the land into a large drainage area that is also a wildlife and native plant marsh with a recreational boardwalk and trail. It used FEMA money supplemented by city funding to elevate nine houses in the past two years, with two more underway and 26 in the pipeline.

In the next five years, the city will dedicate $26 million to water quality projects, such as storm water ponds, breakwaters and “living shorelines,” which help slow erosion and reduce tidal surges.

By September, Hampton will release its plan for adding more resilient infrastructure to Newmarket Creek, which runs from the James River to Langley Air Force Base. The creek, which is a concrete ditch in some places and a meandering stream elsewhere, wandered through fields and grasslands a century ago. Now it bisects Hampton’s central core. When it floods, waters back up and create pools in the middle of roads and developments.

No matter how it’s done, addressing sea-level rise is expensive. In November, the Army Corps of Engineers told the much-larger city of Norfolk, just across the James River, that it would cost $1.8 billion to build flood walls, storm-surge barriers and tidal gates around the city. Norfolk has secured a $120 million grant from the Department of Housing and Urban Development and the Rockefeller Foundation to begin that work.

Both Hampton and Norfolk participate in the 17-city Hampton Roads Planning District Commission, which focuses on research and coordination rather than setting standards or requirements for addressing sea-level rise.

Hampton is seeking smaller grants for projects , with Mayor Donnie Tuck trying to persuade the Virginia General Assembly to allocate funding. City officials also are banking on the fact that if their flood-mitigation plans work, property values will rise, boosting tax revenue that could help pay for the effort.

“If we’re not proactive, there’s going to be a financial impact, as well as civil instability,” Tuck said.

Doing what they can

Studies show that water levels in the Hampton Roads region are now 18 inches higher than they were a century ago, and that they are expected to gain up to five more feet , while the land sinks up to 7.5 inches, by 2100. That combined rise is faster than anywhere else on the East Coast.

The data, and the devastating flooding in the past two decades, have prompted many Hampton residents to take action.

Jamie Chapman and Sandra Campbell bought a cinder-block cottage directly on the Chesapeake shoreline in the Grandview neighborhood as both were preparing to retire from the Virginia Education Association in Richmond. Chapman, 73, who moved in first, built a storage shed in the shape of a small lighthouse. In the spirit of their eclectic, independent-minded community, they lined their bayfront walk with 15 Adirondack chairs they had rescued from trash piles, repaired and repainted in bright beach colors.

Three weeks after Campbell arrived, in 2009, a nor’easter broke out their front windows and dumped huge waves into their living room.

“I looked up and saw a wall of water coming at me,” said Campbell, 65. “And I thought, ‘Oh my, what have I gotten myself into?’ ”

Chapman has since built a concrete channel from the sea wall to the gravel street to help direct water away from the house. In 2013, he organized his neighbors (whom Campbell affectionately describes as a bunch of “oddballs and eccentrics”) to install large boulders on the bay side of the sea wall that break down the pounding waves.

“The big thing that could protect this whole area . . . would be to build a breakwater out there,” Chapman said, looking at the glistening bay under a bright midday sun. “But the city won’t have the political will to do it. . . . It’s up to us to look for the short-term solutions.”

Just west of Grandview is Fox Hill, an old fishermen’s enclave, where families hang on to their houses through generations and seem less fazed by the flooding.

Tuck, the mayor, said Fox Hill residents have told him they’re used to having their “feet wet” and prefer no major flood-mitigation construction there — they just want him to harden the power grid and make sure at least one road stays open for emergency access.

O’Neill recalled one resident saying that his plan to deal with flooding is to buy a bigger truck.

Back in Grandview, where military, cargo and recreational ships slide by on the Chesapeake Bay and jets from Langley roar overhead, Jim McGuire, 69, casts seaside living in a positive light.

The retired oil-and-gas industry man from Oklahoma demonstrated the flood vents that help direct storm surges through his ground-level garage to the street. His water heater and air-conditioning units are elevated, and he replaced the bulkhead between his house and the bay a few years ago.

Life on the water, he said, provides “363 days of paradise and one or two that will scare the hell out of you.”

McGuire said he has little worry about the future, despite climate forecasts that show his neighborhood is one of the most endangered in the nation by sea-level rise.

“That’s my kids’ problem,” he said. “We’re doing what we can. The community itself is forced to band together.”