When the Best Friend of Charleston was built in 1830, it was a marvel of modern technology — the first steam-powered locomotive to offer regularly scheduled commercial passenger service in the country.

When it returns this fall (actually a replica of it) to Charleston, it will be an historical marvel.

Housed in a new glass-enclosed display museum near Ann and John streets, it will tell the story of a short but very important chapter of Charleston’s past.

While some people have been disappointed that the locomotive’s return took a year longer than promised, the city of Charleston, which this week confirmed it will be here around Sept. 15, is to be commended for making it happen. It did so by incorporating the museum into a larger project to renovate the so-called East Shed. In addition to the 3,500 square feet of museum space, the former railway building will include public bathrooms, a meeting area and a private business — likely a family-style restaurant.

The city’s $1 million investment includes $250,000 paid to the city by Norfolk Southern Railroad, which borrowed the locomotive for six years and displayed it in its Atlanta headquarters. Costs above that will be covered by the developer, Ecovest.

Mayor Joe Riley cautioned that it might be impossible to complete the building until the 3.75-ton locomotive is in place.

And in a commendable move, the city is working with an exhibit designer to determine whether artifacts and books that further illuminate the Best Friend’s story and its role in history can be part of the display. Those elements would transform a visual spectacle into an educational attraction.

The designer is working with Mary Lehr, who operates a museum focused on Charleston’s railroad history at Citadel Mall.

The Best Friend’s story is one of hope and recovery. In the 1820s, the area’s economy was depressed. City leaders opted to buy the Best Friend to take people six miles from close to where the museum will be to near Dorchester Road.

Before rail service, people had to travel by coach, horseback, boat or foot. All were dependent upon weather.

The railroad could go despite the weather. It is credited with bringing economic prosperity back to Charleston. Indeed, within five months of its debut, a second locomotive, West Point, arrived in Charleston.

The Best Friend’s life was short. After only six months, it was destroyed by an explosion. But within three years, six locomotives were serving the Charleston area.

Its impact was felt far more widely than in the Lowcountry. The concept of regularly scheduled commercial passenger service revolutionized America’s transportation.

The Best Friend’s return home will be an education and an inspiration as to how innovation and perseverance can pay off.