DALLAS — An eight-foot cross rests on its side, near an assortment of other crosses and a menagerie of police uniform patches. Close by are rain-curled posters and hundreds of artificial flowers. “Back the blue,” reads one sign, not far from where stuffed animals sit on a library shelf that once held true crime books.

Here, deep in Dallas’s central library, archivists have spent months sorting more than 10,000 tributes that flowed in after five law enforcement officers were killed in an ambush on July 7, 2016. The collection, one of the largest of its kind, is a staggering chronicle of public grief and support that followed the attack, the first anniversary of which Dallas marked on Friday.

The archive is not about what happened that night, but about “the outpouring of love from the citizens — from the world — that happened afterward,” said Jo Giudice, the director of Dallas’s public library system. “That’s what’s important.”

In recent years, archivists, historians and librarians have been asked to curate the aftermath of catastrophes: school massacres, a nightclub siege, a bombing, a rampage during a Bible study. The ease and speed with which the sprawling memorials appear belie the years of work that almost always follow.

“Communities that get hit with one of these unexpected events, they have no idea of what to do with this unexpected material,” said Sylvia Grider, an anthropologist who oversaw curation at Texas A&M University after a dozen people were killed in a bonfire collapse in 1999. “Every community has got a different set of problems that have to be resolved, and it’s hard. It’s terrible.”

For the cities that fill the grimmest of roll calls — Boston and Newtown, Aurora and Orlando, Blacksburg and Tucson, Charleston and College Station — advice on how to handle tragedy comes from conciliatory conference calls, knowing emails and occasional seminars at professional conferences. There are questions that are suddenly both logistical and existential: What do you do with truckloads of teddy bears? How do you prevent mildew? How soon is too soon to dismantle memorials?

Tributes surged into Dallas soon after a gunman opened fire during a protest last summer. Five officers — Lorne Ahrens, Michael Krol, Michael J. Smith, Brent Thompson and Patrick Zamarripa — were killed; the gunman died during a standoff.

By the next night, the headquarters of the Dallas Police Department, which employed four of the five officers, was the site of a swelling memorial. Days later, Ms. Giudice heard a forecast for a summertime storm and organized a mission to preserve what mourners had left in tribute.

Using a truck that normally delivers library books, city workers and volunteers raced the rain to sweep up candles and vases, cards and toy cars. They went back at least twice in the days afterward, filling shelf after shelf until they ran out of space. The only items not kept were the fresh flowers, except for a bouquet of white roses, which Ms. Giudice dried out and hung in her office, fastened by a blue ribbon.

Although the library is housing and organizing the collection, the artifacts belong to the police.

“We just want to preserve and protect this collection for them,” Ms. Giudice said. “Just like they protect us, we’re going to protect these items for them.”

It will take years to curate Dallas’s collection, parts of which are being displayed this month in many of the city’s library branches, because of the volume of material and the abrupt way it entered the archives.

The librarians hope to present the collection online, as libraries in Arizona and Virginia did after mass shootings in those states, and there is talk of a museum. But there is even more talk of where to find the money for all of it, and of the more subtle, lonely challenge of curators absorbing a civic trauma like no other here in decades.

“Nobody goes down there without being moved in some kind of way,” an archivist, Brian Collins, said. In fact, almost no one visits the collection alone.

Dallas has some experience with the cataloging of tragedy, and its municipal library’s holdings include four binders of cards left at Dealey Plaza after the assassination of President John F. Kennedy. Viewed now, nearly 54 years later, they are a time capsule of shock and sadness that still permeate Dallas.

“In your final moment of life, we saw your smile and wave. This memory we will always treasure,” said one note, which four people from Dallas had signed.

“Spontaneous shrines,” as Dr. Grider and other scholars describe them, beyond war memorials are a largely new phenomenon whose popularity can be traced to the 1997 death of Princess Diana. Ever since, and especially after Sept. 11, 2001, displays of affection and grief have become familiar elements of mass tragedy.

People left running shoes after the bombings at the Boston Marathon. A white supremacist’s massacre of nine black churchgoers in Charleston, S.C., led to more than 500 quilts, prayer shawls and other textiles. And in Orlando, Fla., where 49 people were killed last year at Pulse, a gay nightclub, there were 49 crosses.

“I don’t think you can possibly fathom the depth and breadth of a project that comes upon you so immediately in a crisis situation,” said Michael Perkins, who oversees curation efforts in Orlando and hired temporary workers to help with the deluge of items, only about 6,000 of which have been tallied so far.

“As much as the actual event can represent the worst of humanity,” Mr. Perkins said, “in many different ways, these memorials can represent the best.”

Not that good intentions make the task of people like Mr. Perkins any easier. Tributes are still arriving at Emanuel African Methodist Episcopal Church in Charleston, and more than two years after the attack, archivists are still grappling with issues of space and money. Yet they are preserving as much as they can; to do otherwise, they said, would risk history.

“These are materials that people created out of a sense of urgency and need, and it happens so quickly,” said Meg Moughan, the records manager for the City of Charleston and one of the people who has been involved with the preservation efforts. “You can’t really determine what it’s going to mean, but you know you have to take steps to keep these materials available.”

Preservationists say the written materials will prove most important to researchers. But as the collections await history’s judgment, and as the tragedies slowly fade from public view, the tributes remain poignant for family members and friends of the dead.

“Many church members felt embraced because the world just came to our feet,” said Liz Alston, who has been a member of Emanuel for 49 years and is the congregation’s historian.

Here in Texas, Rick Zamarripa, the father of Officer Zamarripa, plans to accept the library’s offer of private collection viewings for family members. At his home in Fort Worth, he is still sifting through cards and social media messages about his son, trying to answer a few at a time.

“I’m scarred for life,” he said softly on Wednesday, the anniversary of his last face-to-face encounter with his son before he died. “This will be with me until I’m with Patrick.”

But Mr. Zamarripa’s private grief mixes with the public’s. Every week, usually after he finishes his job as a meat-cutter at a grocery store, he drives to the Dallas-Fort Worth National Cemetery to visit his son’s grave.

He kisses the top of the polished tombstone, and he sits and talks to his son.

Almost every time, he first sees tributes others have left.