The day marked a profound transformation. A dangerous journey that once took months could now be completed in a week, revolutionizing the fractured country’s economy.

The leaders of the Central Pacific and Union Pacific Railroads came together to celebrate the joining of the tracks, and Leland Stanford, the business tycoon and political leader who founded Stanford University, drove a ceremonial golden spike into a tie to unite them.

But many of the workers who had built the railroad were all but invisible at the ceremony, and in its retelling for many years afterward. They included about 15,000 Chinese immigrants — up to 90% of the workforce on the Central Pacific line — who were openly discriminated against, vilified and forgotten.

Now those workers are being written back into the history of the railroad, thanks to the dogged efforts of their descendants and of scholars. At the 150th anniversary of the golden spike ceremony on Friday, and at associated events held last week in Utah, thousands gathered to recognize a more complete picture of the monumental feat.

“I felt such elation,” said Connie Young Yu, a San Francisco-based author and historian with the Chinese Historical Society of America. In her speech at the ceremony on Friday, Yu paid tribute to the Chinese laborers’ courage and sacrifice.

Yu’s great-grandfather helped build the railroad, and her mother was the only descendant of the Chinese workers at the 100th celebration of the golden spike ceremony in 1969. The centennial was a bitter disappointment for the descendants of the Chinese railroad workers, she said. The president of the Chinese Historical Society was nudged off the list of speakers, and the transportation secretary, John A. Volpe, failed to mention the Chinese workers.

“Who else but Americans could have laid 10 miles of track in 12 hours?” he famously asked.

In fact, it was Chinese and Irish workers who achieved that feat. In the years that followed, the Chinese workers would face rising anti-immigrant sentiment and violence, and would be barred from citizenship by the 1882 Chinese Exclusion Act.

At a ceremony on Friday, Transportation Secretary Elaine L. Chao, the first person of Chinese descent to hold the position, paid tribute to the diverse workforce. In addition to Chinese workers, there were many Irish immigrants, Civil War veterans, Mormons, African-Americans and Native Americans, Chao said.

Native American communities, of course, were also forcibly displaced by the railroad and the westward expansion it enabled. An exhibit on the Chinese workers, on view at the Smithsonian through next year, also highlights the experiences of Native Americans.

Chao said that the achievements of the Chinese workers were poignant because many did not have the opportunity to become citizens, and so little record of their existence survived.

Yet the engineering feat they undertook was “every bit as consequential as the digital revolution that binds the world” today, she said.

The renewed focus on the contributions of the Chinese workers is due in large part to Gordon H. Chang, a historian at Stanford University, who has spent decades researching the workers’ history and codirects the Chinese Railroad Workers in North America Project.

Chang noted that for many descendants of railroad workers, the 150th anniversary events marked the culmination of a lifelong effort to recover the history of their families and communities. But for him, it’s also a beginning.

“I’m quite enthusiastic that because of the attention to this history, more people are going to come forward to contribute bits and pieces and documentation,” he said.

The Chinese workers took on some of the most dangerous and difficult work, including cutting across the Sierra Nevada mountain range, Chang has written. Hundreds are believed to have died. But their experiences were largely unrecorded.

Chang and Shelley Fisher Fishkin, a professor of English and the humanities at Stanford, carried out painstaking research to fill that gap, drawing on historical photographs and material objects, interviews with descendants of the workers, newspaper accounts and business records.

That the research center is at Stanford University is notable. Leland Stanford — a key investor in the Central Pacific line — had disparaged Chinese immigrants, calling them “an inferior race,” years before he employed thousands of them.

They were paid lower wages than white workers, even as they worked longer hours, took on the most treacherous stretches of track and became renowned for their work. Leland Stanford would come to greatly admire them, Chang has written.

“I am painfully aware that Leland Stanford became one of the world’s richest men by using Chinese labor,” Chang wrote in an opinion piece published Friday in The Los Angeles Times. “But I also try to remember that Stanford University exists because of those Chinese workers.”

This article originally appeared in The New York Times.