Mike Smith remembers how the disease ravaged San Francisco’s Castro district, the heart of the gay community. How you’d pass emaciated men on the street, covered in cancer scars, and how, by the summer of 1987, a thousand men in a 10-block radius had died.

The disease was AIDS, and as it spread across the country, leaving fear and grief in its wake, Smith teamed up with gay rights activist Cleve Jones to start the famous AIDS quilt to commemorate the pandemic’s victims.

On Wednesday, Smith, Jones, House Speaker Nancy Pelosi (D-Calif.) and Rep. John Lewis (D-Ga.) gathered to announce that the quilt project’s vast paper archive was coming to the Library of Congress and the quilt itself was headed back to San Francisco, where it began.

Since 2001, the 55-ton quilt and its archive had been housed by the Names Project Foundation, in Atlanta, where project president Julie Rhoad said she had been searching for new homes for both for six years.

The announcement was made during an emotional ceremony in the ornate great hall of the library’s Jefferson Building, across the street from the U.S. Capitol. The event was held against a backdrop of three of the quilt’s huge panels, including one created to commemorate the library’s lost loved ones.

A second panel honored Susan Piracci Roggio, “my Susie,” Pelosi called her Wednesday, who had been a flower girl at Pelosi’s wedding and died in 1986.

The quilt is going to the federally designated National AIDS Memorial, headquartered in San Francisco, and will be housed in a facility in Oakland, Calif., the memorial’s executive director, John Cunningham, said.

The quilt project began with a meeting of volunteers in San Francisco on May 12, 1987, Smith said. The first panel was made to remember Jones’s friend, Marvin Feldman. The first display was on Oct. 11, 1987, on the Mall.

It grew as people made and sent in cloth panels to be added in memory of friends and relatives who feared their deceased loved ones would be forgotten.

The quilt is believed to be the largest community art project in the world, according to the foundation.

Yet it chronicled a disaster.

At first, most victims seemed to be young, urban gay men. The virus can be spread via transfers of infected bodily fluid such as blood or semen.

But it can also spread, among other ways, via blood transfusions, sharing of contaminated hypodermic needles and heterosexual intimacy.

“You would pass people on the street, emaciated and covered in Kaposi [sarcoma] scars, and you would know, you were saying hello to them but you were saying goodbye,” Smith recalled of his San Francisco neighborhood. “You were never going to see these people again.”

“It was all around you,” said Smith, who lived in the Castro neighborhood.

“I think the quilt had a real transformative effect just by opening up that workshop on Market Street,” where it began, he said.

“People could come in, having just been diagnosed, and have somebody to talk to and cry on the shoulder of,” he said. “People could start being public about a friend who had died and wanting some help making a panel.”

“We really became a de facto community center and grief counseling center,” he said.

The quilt now has 50,000 panels that commemorate 105,000 people, Rhoad said. Parts of it are regularly displayed across the country.

Since 1981, an estimated 636,000 Americans are believed to have died as a result of AIDS, Librarian of Congress Carla Hayden told the audience Wednesday.

Many more have perished around the world, and many live with HIV, the human immunodeficiency virus that causes acquired immunodeficiency syndrome, or AIDS.

The virus, which today can be controlled with drugs, attacks the body’s immune system, leaving it vulnerable to an array of maladies such as the skin disorder Kaposi’s sarcoma or the rare pneumocystis carinii pneumonia.

On Wednesday, those in the library audience with HIV/AIDS were asked to stand and be recognized.

The quilt archive consists of a trove of 200,000 letters, photographs and other artifacts that record the creation of the quilt and the toll taken on those the disease left behind.

These were things people sent along with the panels, Rhoad said. They give the survivors’ stories, the backstories. “We’ve never had the opportunity to get that material curated, collected, cared for,” she said.

Once crammed into 40 filing cabinets in Atlanta, they will be housed in the library’s American Folklife Center, where some of it has already arrived, said the center’s director, Elizabeth Peterson.

As for the quilt’s future, Rhoad said, it was like conserving a historic flag. “There are certain segments . . . [where] we have to be a little bit more careful,” she said.

Jones told those assembled under the hall’s six stained-glass ceiling windows that the quilt idea came to him during a gay rights/AIDS candlelight march in San Francisco in 1985.

Marchers had hung the names of AIDS patients from the front of an old federal building.

“As I looked at that, I thought to myself, ‘It looks like some kind of strange quilt,’ ” he said. “I thought of my grandma back in . . . Indiana and the quilts that she had sewn . . . It was such a powerful symbol.”

At the beginning of the event , a segment of the quilt was spread over a large central platform in the hall.

And at the end of the ceremony, anyone who wished to place a rose on the panel in memory of someone lost to the disease was invited to do so. A single long-stem rose had been placed at every seat in the hall.

Many people got up and placed a rose, among them Jennifer A. Cutting, a specialist at the Folklife Center and 32-year veteran of the library.

She said she was remembering a beloved colleague, Arnie Bellefontaine, an executive officer in the cultural affairs office of the Library of Congress. He is represented in the “Sine Nomine” — without a name — section of the library’s quilt panel, she said.

“He was a very dear friend,” she said. “Arnie left the library before he became very ill and went somewhere else to weather the last stages of the illness.”

“He was in the cooking club with me,” she said. “He used to make these bone-shaped cookies at all of our bake sales, and he called them human bones.”

“He was a warm, wonderful beacon of humanity in what can be a sea of bureaucrats, in a city of suits and stiffs,” she said. “So, that rose is for him.”

An earlier version of this story said panels from the AIDS memorial quilt were spread over a large platform at the Library of Congress at the end of an event on Wednesday. The panels were spread at the beginning of the event.