City officials and business leaders of New Bedford came to the perfect place for inspiration last month, just before they broke ground on America’s first port terminal dedicated to the offshore wind industry. For all the lament in New Bedford about the city’s high unemployment rate, Bremerhaven, Germany, had it worse. Locals once said this was a city of no hope.

By 1999, Bremerhaven’s shipbuilding and fishing industries had crashed. A US military base had shut down, leaving shopkeepers idle and their landlords empty handed. Unemployment hit 25 percent. A quarter of its population disappeared. This once-proud gateway to the North Sea was now “a windy, empty town filled with just old people,” according to Annette Schimmel of the port handler BLG Logistics.

“I compare it to a little Detroit,” said Jens Eckhoff, president of the German Offshore Wind Energy Foundation and a former senator. “I made a lot of visits to schools and it was horrifying to talk to the young people. Their first question was always, ‘How do I get out of Bremerhaven?’ ”

Former Mayor Jorg Schulz said, “People compared us to Eastern Europe and said we should just close up the door. My job was to keep going to meetings and asking everybody, ‘Do you really want to close the door?’ ”

Instead, a new door opened. Once a windy, empty town of 113,000, Bremerhaven now appears on maps under the moniker “Wind City.” In 2000, the German government launched one of the world’s most aggressive renewable energy efforts, unleashing billions of dollars in public and private investments in offshore wind. Bremerhaven and Cuxhaven, a smaller city 25 miles to the north that still had major container terminals and frozen fish processors, had room to accommodate the outsized demands of the offshore wind industry: turbine blades with the wingspans of passenger jets and towers with the heft of scores of elephants. It also had high-powered cranes to load the giant equipment onto specially fortified ships.

“This is our German moon landing,” said Ronny Meyer, managing director of WAB, a public-private wind agency in Bremerhaven. “Like John F. Kennedy’s speech launching the aerospace industry, we are doing something we’ve never done before in the ocean.”

Top turbine companies set up shop in the area. Electronics, engineering, hydraulics, welding, plastics, and carbon-fiber companies were joined by gear, bolts, and tool manufacturers to create a supply chain. Local universities set up programs to retrain idle fishermen and ship builders for the offshore wind industry.

Now, more than 10 years later, 5,000 jobs tied to offshore wind energy have been created in the Bremerhaven/Cuxhaven region. Downtown Bremerhaven gleams with new buildings, including museums that celebrate the port’s role in immigration and teach children about the climate. Unemployment has been halved to 12 percent in Bremerhaven and nearly halved in Cuxhaven, dropping from 11 percent to 6 percent.

There is still a long way to go, officials admit, particularly in Bremerhaven. But Germany’s first offshore wind farm was commissioned only three years ago. Now, so many projects are underway that the number of jobs in Germany’s offshore wind industry is expected to soar from 10,000 to an estimated 33,000 by 2021.

After a week of touring factories where workers constructed turbine foundations, watching welders’ sparks cascading in blinding firefalls, New Bedford Mayor Jon Mitchell said, “It’s hard to avoid the adage that seeing is believing. It was like watching an update of an old World War II documentary of factories that were hives of activity, with welders cranking out submarines and workers bending steel on vessels — except that it was giant tripods for wind turbines. Bremerhaven was in a Depression-era situation, but now has its own center of gravity. That is what we want.”

Derrick Z. Jackson/Globe Staff

A turbine foundation in Bremerhaven dwarfed a worker.

Can they get it? For a week, the New Bedford delegation toured ports and wind-turbine manufacturing facilities in Germany and Denmark, which last year became the first nation to cross the 30 percent mark of electricity supplied by wind. The trade mission culminated in a nine-mile boat trip over rough seas to Denmark’s new Anholt wind farm, which was completed last week. The farm, which has 111 turbines, is tantalizingly similar to the long-awaited Cape Wind project in Nantucket Sound, which is slated for 130 turbines using similar Siemens 3.6 megawatt equipment.

“The crazy thing,” said Matthew Morrissey, executive director of the New Bedford Economic Development Council, “is that even though Europe was many years ahead of us in developing the offshore wind industry, we’re not that far behind.”

Indeed, New Bedford stands at a rare threshold of redevelopment. The state hopes to have a new $100 million port terminal ready for turbine deployment in 19 months. It wants to be ready in time to capture a significant portion of the setup work for Cape Wind, which is ironing out the last details of its financing plan and fighting off its remaining legal challenges. But the real hope for the future lies in the 1,200-square-mile area of ocean several miles south of Martha’s Vineyard and Nantucket which has been designated by the Interior Department for future development. It’s within easy reach of boats from New Bedford.

There is no reason that New Bedford, currently sitting on one of the state’s top unemployment rates at 12.5 percent, cannot enjoy the same renaissance that has swept over Bremerhaven and Cuxhaven. New Bedford has plenty of idle or underemployed fishermen, longshoremen, and tradespeople, many of whom could be retrained for the offshore wind industry. UMass Dartmouth and Bristol Community College are already working on preparing new workers, from welders to engineers.

Nonetheless, German officials warned the visiting Americans that while some skills may be transferable from older industries, offshore wind has many unique needs. It presents some military-level challenges, such as preparing workers to be lowered down from helicopters at skyscraper heights to perform “ordinary” maintenance while gales buffet the machines. That makes training expensive, and begs the question of who will pay to prepare local workers when offshore companies can simply bring trained workers over from Europe instead.

“I am sure that there would be normal welding jobs,” said Roland Schumacher, 34, a mechanical engineer for the Areva wind turbine facility. “But once the turbine is up, the service people are out there all alone. They have to be mechanics and electricians all in one, and have to know every tool. They have to know so many disciplines.”

New Bedford doesn’t need to carry the burden by itself. Having the nation’s first offshore wind terminal on the South Coast sets up Boston to be a center for the offshore wind industry. If the long-proposed South Coast rail project is finally approved, it could connect research and development facilities in Boston to manufacturing plants and ports in New Bedford, mirroring the relationship Bremerhaven and Cuxhaven have with the nearby metropolis of Hamburg. Dave Slutz, CEO of New Bedford’s Precix, which manufactures o-rings and automotive seals and ships them around the world, said, “We could be the Silicon Valley of wind.”

It would help greatly if there were more support for offshore wind power than currently exists. While the industry has the ardent backing of Governor Patrick and President Obama, it has enough skeptics that the next governor or president could easily be a naysayer. Meanwhile, Congress still has not agreed on a long-term program to support offshore wind farms. Indeed, many lawmakers from coal states have spent years trying to stall or kill efforts to provide incentives for renewable energy.

“You really have to have a stable political framework that is looking 20, 30 years ahead,” Meyer said. “Any discussion other than that is poison for investors.”

Political support has to be strong enough to withstand the growing pains of the still-developing offshore wind industry. Even in Germany, which has made a commitment to draw 80 percent of its energy from renewable sources by 2050, and is phasing out its nuclear plants, there is frustration over delays in constructing a new electrical grid, caused by the challenges inherent in placing a new technology in harsh seas.

“When we got started with offshore, we thought it would be a gold mine,” said Jorg Schulz. It’s not — at least not yet.

On the site of one turbine maker, many two-story nacelles (the housing for the generating components of turbines) and hubs for blades lay wrapped in white plastic because of slowdowns in construction. “When you have parts this big,” said Benjamin Johannsen, offshore turbine product manager at REpower turbines, “You cannot have them laying around. It costs a lot of people a lot of money.”

That said, Europe now has about 1,700 offshore wind turbines spinning, mostly in England, Denmark, the Netherlands, Germany, Belgium, and Sweden. They spin on the continued belief that their costs will be outweighed by the health benefits of clean energy and the independence that will come with moving away from fossil fuels. “If you want to replace nuclear, you have no choice” but to invest in new forms of renewable energy, said Hans-Joachim Stietzel, director of economic development in Cuxhaven. “There is no political support here for fracking. We only have the wind.”

New Bedford is no farther away from the wind than Cuxhaven. Building the port terminal itself will likely be the easiest step, as designers can learn from the growing-pain mistakes made in Germany, such as siting manufacturing facilities behind locks that are now too small for the latest generation of deployment vessels, or not including enough storage space for ever-larger and longer towers, blades, and parts.

Derrick Z. Jackson/Globe Staff

Turbine housing components in Bremerhaven were near completion.

Although there is plenty of interest from offshore wind developers, according to Alicia Barton, head of the Massachusetts Clean Energy Center, there are no Massachusetts deals in the works to follow Cape Wind. That’s already a problem, because the average offshore project takes five to seven years from conception to completion. That likely means there will be long periods of inactivity in the offshore wind industry during the early years of the port terminal. The state hopes to offset that risk by making the terminal capable of handling normal cargo.

“We understand that big companies like Siemens are not going to show up and build a factory in New Bedford unless they know there is a pipeline of projects,” Mitchell said. “On one hand, we can’t wait for the business to come to us, but I have to be realistic with the people of New Bedford that it may take two or three projects in the pipeline before other companies begin to line up. I’m hopeful we can see this three to five years from now.”

That means New Bedford officials have to work hard to keep unions, businesses, students, and community activists hopeful enough to prepare for offshore wind jobs that may never arrive, while casting off memories of the city’s many dances with disappointment. Indeed, 28 of the acres the state hopes to use for part of the new turbine port are where New Bedford once hoped to land a giant turbine test facility that now resides in Charlestown instead.

“After I started reading about the offshore wind industry, I kept thinking it could be our Cape Canaveral,” said Ron Rheaume, business manager of Carpenters Union Local 1305 in nearby Fall River. “Look what it did for Florida. It’s mind-boggling to think we can unlock a whole new industry.” The new industry cannot come too soon for longshoremen like Joe Fortes and Kevin Rose, who noted that the most significant cargo coming into New Bedford on one winter landing was clementines.

How big and how soon is the question. Bremerhaven’s rally from 25 percent unemployment to offshore wind deployment is evidence that big things can happen. More than one port official said they had “no clue” what they were getting into a decade ago with the size of wind turbines. “When you deal with 900-ton platforms, we had to invent and add new forklift, crane, barge, and storage solutions every step of the way,” Annette Schimmel told the New Bedford delegation. “We didn’t have any technical consultants. You can learn from our learning curve.”

If this German city, formerly of no hope and no clue, has come this far, it gives New Bedford plenty to hope for.