The auction in Paris was set to move briskly, at about two items a minute; the room was hot and crowded, buzzing with reporters.

More than 100 American Indian artifacts were about to go on sale at the Drouot auction house, including 24 pieces, resembling masks, that are held sacred by the Hopi of Arizona. The tribe, United States officials and others had tried unsuccessfully to block the sale in a French court, arguing that the items were religious objects that had been stolen many years ago.

Now the Annenberg Foundation decided to get involved from its offices in Los Angeles. It hoped to buy all of the Hopi artifacts, plus three more sought by the San Carlos Apaches, at the Dec. 9 sale and return them to the tribes. To prevent prices from rising, the foundation kept its plan a secret, even from the Hopis, in part to protect the tribe from potential disappointment. Given the nine-hour time difference, the foundation put together a team that could work well into the night, bidding by phone in the auction in France.

The foundation had never done something like this before — a repatriation effort — and the logistics were tricky, to say the least.

Two staff members in Los Angeles, one a French speaker, were assigned to the job. The foundation also quietly arranged for a Paris lawyer, Pierre Servan-Schreiber, who had represented the Hopi pro bono in the court proceeding, to serve as lookout in the auction room.

He stood in the back, on the phone to the foundation. Whispering updates to him was Philip J. Breeden, a cultural attaché from the United States Embassy.

“It was intense, like a movie,” Mr. Servan-Schreiber said.

But camouflaging the role of the foundation was crucial.

“I knew nothing good would come out of it if the house knew there were people out to get the whole thing,” he said. “I was sure that would jack up the prices.”

The sale had been assembled by the auction house EVE with pieces from a variety of American tribes that were held by a number of French collectors, all of whom said they had owned the items for many years and had good title to them. Several collectors said they had been impressed by prices realized at an April auction of 70 Hopi artifacts.

The tribe had been angered by the earlier sale as well, which like this auction featured vibrantly decorated Hopi headdresses, known as Katsinam. The tribe, which had gone to court to block both sales, believes the items are not simply religious, but living entities with divine spirits.

Gregory Annenberg Weingarten, vice president and director of the foundation who lives in Paris, had followed the legal battle in the French news media. After the Hopi lost in court on Dec. 6, he went to the auction house to preview the artifacts, all of which are more than a century old.

“These are not trophies to have on one’s mantel,” Mr. Weingarten would say later. “They are truly sacred works for the Native Americans. They do not belong in auction houses or private collections.”

Mr. Weingarten had his California staff tally the presale estimates from the auction catalog and confirm that the objects were authentic. The staff members also became familiar with the Hopi belief system and built a database that would allow them to follow online the bidding on the objects they wanted. Mr. Weingarten approved a budget of $500,000 to $1 million to buy all 27 disputed Native American lots — the 24 masklike Hopi artifacts and three items of divine significance to the San Carlos Apache, also in Arizona. To do so he tapped into a discretionary fund set aside for individual projects.

“It was a leap-of-faith kind of moment for us,” said Leonard J. Aube, executive director of the foundation, which was founded by Walter H. Annenberg, the publisher, philanthropist and diplomat. “Not a lot of foundations are geared up for this kind of clandestine, late-night activity.”

At one point, the owner of the EVE auction house, Alain Leroy, said he had noticed that one phone bidder was grabbing up the disputed Hopi objects and told an employee to check into it. Reassured that the buyer had wired money ahead of time and was legitimate, he says he nonetheless grew frustrated and even muttered aloud that he hoped the secret bidder would “leave some for the others.”

Members of the Hopi tribe were also watching the sale online from Arizona. Unaware of the forces at work on their behalf, they said they became dispirited as item after item sold. Sam Tenakhongva, a cultural director for the Hopi, said when he turned off his lights at 2 a.m., he felt he was saying goodbye to the spirits embodied in the headdresses.

The foundation, however, had enjoyed marked success in the bidding. By the end of the auction, it had spent $530,695 and bought all but three of the 24 Hopi objects and the three other Apache artifacts that the foundation had sought.

And one of the three, a Hopi headdress featuring antelope antlers, had been bought by Mr. Servan-Schreiber on behalf of a couple, Marshall W. Parke, of the private equity firm Lexington Partners, and his wife, Véronique, who had instructed him to obtain what he could as a gift to the Hopis.

Mr. Servan-Schreiber said when it was his turn to bid, he took care to inform the foundation people, “so we wouldn’t start bidding against each other.”

The foundation lost out on only two items, both times, participants said, because of miscommunication. But they secured the auction’s priciest lot, a Hopi Crow Mother headdress that sold for $130,000. The event, which was over in a quick hour, generated $1.6 million in sales.

“It’s a good outcome for the Hopi but not the collectors, I suppose,” Mr. Leroy, the auction house owner, said of the foundation’s tally. The Hopi did not learn of their tribe’s good fortune until several hours later when the foundation sent an email alerting them to its clandestine purchases. Mr. Aube said the Annenberg Foundation, which focuses on civic and community projects, is consulting with the Hopi on how best to return the Katsinam.

The objects, surreal faces made from wood, leather, horsehair and feathers and painted in vivid reds, blues, yellows and oranges, cannot be encased in Bubble Wrap, for example, because it would be seen as suffocating the divine spirits. The Hopi have not identified their plans for these artifacts on their return, but they are not viewed as art objects or housed in museums. Typically, Katsinam are still used in spiritual ceremonies or are retired and left to disintegrate naturally.

For Mr. Tenakhongva, the fact that the Katsinam had to be bought and paid for, even by benefactors, was a bittersweet nod to the reality that some American Indian artifacts have become highly sought, expensive commodities.

“No one should have to buy back their sacred property,” he said. “But now at least they will be at home with us and they will go to rest.”