Elon Musk was entitled to be elated when he welcomed two NASA astronauts back to earth on Sunday. His company, SpaceX, had blasted them into space and then brought them safely home 63 days later.

The entire mission was a marvel of engineering and a milestone for American enterprise. In its current mood of exhaustion and discord, the country might need reminding that, for all its shortcomings, it’s still capable of stirring achievements.

SpaceX deserves plenty of credit for this one. Taking off in May from the same launchpad that served the Apollo missions, the company’s Falcon 9 rocket flawlessly conveyed a reusable Crew Dragon capsule into orbit, where it eventually docked with the International Space Station.

The astronauts on board, Bob Behnken and Doug Hurley, traveled in style, with modish new flight suits, slick touch-screen controls and more than 1.7 million pounds of thrust propelling them through the atmosphere.

It sent a clear message: After nine years of ignominiously hitching rides aboard Russian rockets, the U.S. space program was back in business. The launch — a first for any private company — also inaugurated a new era of public-private cooperation, with SpaceX and its competitors aiming to carry astronauts to the moon and perhaps beyond in the years ahead. This blend of public-spiritedness and private competitiveness holds immense promise, and suggests that the best days of the U.S. space program may yet lie ahead.

“NASA has a long history of doing stunning things in the middle of very difficult times,” Jim Bridenstine, the agency’s administrator,  told Bloomberg Television shortly before takeoff. He was hardly exaggerating.

The moon landing in 1969 unified a country that only the year before had been rocked by riots, assassinations and a staggering death toll in Vietnam. When Alan Shepard became the first American to visit space in 1961, he also became a national hero at a harrowing moment of the Cold War — a moment evoked in May by mission control, when they quoted Shephard in a message to the astronauts just before takeoff: “Let’s light this candle.”

These too are difficult times. Coping with the COVID-19 pandemic and reckoning with America’s legacy of racial injustice haven’t left much energy for saluting a remarkable instance of progress. This was nonetheless such a moment. It exemplified the best of American ambition and ingenuity, and holds out the promise of better days to come. 

Editorials are written by the Bloomberg Opinion editorial board.