The Treasury Department team had been working nonstop on a plan to freeze Libyan assets in U.S. banks, hoping they might snare $100 million or more and prevent Moammar Gaddafi from tapping it as he unleashed deadly attacks against protesters who wanted him gone.

Now, at 2:22 Friday afternoon, Feb. 25, an e-mail arrived from a Treasury official with startling news. Their $100 million estimate was off — orders of magnitude off.

The e-mail said there was in “excess of $29.7 Billion — yes, that’s a B.”

And most of the money was at one bank.

It was a piece of extraordinary good fortune for the Obama administration at a crucial moment in the efforts to address the bizarre and deadly events unfolding in Libya.

Never before had U.S. officials so quickly launched economic sanctions affecting so many assets of a targeted country.

The frenetic 72 hours leading up to the Executive Order 13566 illustrate how a process of identifying and freezing assets — something that customarily has taken weeks or months — has become one of the first tactical tools to employ in the midst of fast-breaking crises.

It also shows that government officials have learned from other recent economic sanction efforts, including against Iran and North Korea. Instead of being a secondary measure, as in the past, economic sanctions have become a centerpiece of national security policy.

The same global electronic networks that dictators use to move billions in state assets can also be turned against them, when government and financial industry officials summon the will. The successful Libyan sanctions effort relied on cooperation with a wide range of financial firms in the United States, including the bank holding the bulk of the Libyan assets, which Treasury officials have declined to identify.

Officials also would not provide detailed information breaking down the assets, which include holdings by individuals and Libya’s sovereign wealth fund. Investigators are expected to focus on whether any laws were broken in the handling of the money.

The $32 billion frozen so far by the United States represents a significant portion of the nation’s wealth. In 2009, Libya had a gross domestic product of $62 billion; its sovereign wealth fund is estimated at $40 billion and its central bank reserves at $110 billion.

The European Union has added the central bank, the wealth fund and three other Libyan institutions to its sanctions — two weeks after the U.S. action. So far, British officials have seized more than $19 billion in Libyan assets.

U.S. Treasury officials said they see their sanctions as one thrust in a broader campaign to isolate Gaddafi.

“Gaddafi is still there and is still brutalizing his people; there’s obviously still work to be done,” said David S. Cohen, acting undersecretary for terrorism and financial intelligence. “We never expected that this by itself was going to persuade Gaddafi to give up power.”

He said Gaddafi is still “paying mercenaries. He’s paying his troops. He’s in a cash-intensive business. And not having access to the Libyan Investment Authority assets, the Central Bank of Libya assets, other assets that he and his children have overseas, is going to be a problem for him.”

‘Incredibly intense, but in the best way’

The plan to find and freeze Libyan assets began taking shape Feb. 23, during an 8:30 a.m. meeting of senior officials in the White House Situation Room.

Libya was deteriorating quickly. The Libyan air force had bombed civilian protesters. In a rambling and incoherent speech on state television, Gaddafi had blamed “foreign rats” for the chaos. He also promised to fight “to the last drop of my blood.”

The possibility of a military response or imposition of a no-fly zone over Libya came up at the Situation Room meeting that morning. But those steps were considered politically untenable for the moment. Officials worried that any aggressive move might trigger a deadly backlash against American citizens who had been unable to leave the country.

“No one wanted to do anything and certainly the president didn’t want to do anything that would put those people at risk,” said Stuart Levey, the Treasury official who led the drafting of the executive order.

National Security Adviser Thomas E. Donilon asked Treasury to prepare options for economic sanctions, an undertaking usually weeks or months in the works. But Levey and the others at Treasury scrambled virtually nonstop over the next two days.

Some of the Treasury people involved had helped launch a prior economic sanction against Libya nearly a decade earlier.

They immediately reached out to their contacts in U.S. financial institutions — many of whom had become close allies in the effort to stop terrorism financing. The Treasury officials quietly asked the bankers to identify assets controlled by the Libyan government, Gaddafi, his family and their associates.

Some of them dusted off a list of more than 400 Libyan citizens and entities who had been included in U.S. economic sanctions that were lifted in 2004. Three officials with major banks who spoke on condition of anonymity because of the sensitivity of matter said their institutions helped Treasury officials identify targets for the list.

“Banks were already asking their compliance departments, ‘What do we have? What’s our exposure here?’ ” Adam Szubin, director of the Treasury’s Office of Foreign Assets Control, said in an interview.

Szubin said the effort was “incredibly intense, but in the best way.”

“This is what we’re here to do, is for moments like this when there is a crisis. I don’t know what more you could ask as a career civil servant than the White House turning to you and saying, ‘We need you. We need you to move incredibly fast. How quickly can you deliver?’ ”

Levey, who was then Treasury’s first undersecretary for terrorism and financial intelligence, a job he had held under presidents George W. Bush and Obama, shepherded the effort.

The morning after being assigned the job, Levey handed over a draft and 30 pages of supporting documentation, far sooner than expected. “These are complex, painstaking, exacting processes,” said one participant in the meeting, who spoke anonymously because he was not authorized to discuss the matter.

As much as the members of the group wanted to move forward that day, the consensus was that they had to wait. A ferry hired by the government to retrieve Americans in Tripoli was stuck in port by nasty weather and 15-foot waves in the Mediterranean Sea.

Waiting on a ferry

On the morning of Friday, Feb. 25, everyone kept watch on the ferry. Even as the weather improved, the situation in the country worsened. Even the president was seeking regular updates about when the boat was leaving.

Even as Levey immersed himself in the details of his task, he was leaving the government in a matter of hours for a career in the private sector.

When the 47-year-old Levey returned from the principals meeting at the White House that Friday, he and his top staff members gathered around a conference table stocked with sandwiches and drinks from Cosi — a gift from his mother to his staff for his last day in the government.

After Levey finished his tuna salad, his deputy delivered the surprising news about the potential value of the Libyan assets in the United States. In talks with one bank, Treasury officials were told about billions in Libyan holdings, including cash and investments such as securities.

Levey reported the number to the White House, with a caveat: In 61 / 2 years at Treasury, he had found that early reports often are wrong. “I thought, well, that would be significant, but I don’t know whether that’s true or not,” Levey recalled.

Cohen, who was Levey’s deputy and has been nominated to replace him as undersecretary, said the news created an “intensity of, ‘We’ve got to get this done tonight.’ ”

After three days of delays because of strong winds and high seas, a U.S.-chartered ferry named the Maria Dolores finally sailed away that Friday from the chaos in Tripoli, bound for Malta. The more than 300 passengers aboard included more than 150 U.S. citizens.

Government officials shuttered the U.S. Embassy in Tripoli, and a chartered flight carried the remaining embassy workers out of the Libyan capital.

“There was a lot of relief when the plane left,” said National Security Council spokesman Tommy Vietor.

Administration officials soon carried the executive order to the president’s private residence on the second floor of the White House, where he signed it. At 8 p.m. Feb. 25, the order took effect.

Within minutes, dozens of employees at the nation’s largest banks, who had remained at their desks that night waiting for the signal, sprang into action. They began freezing more than $30 billion in an effort to cripple a violent dictator half a world away.

“We do have reason to believe there are substantial sums of money blocked by this action and preserved for the Libyan people and protected from being looted by the Libyan regime,” Levey said that evening in a conference call to reporters during his last hours at Treasury.

He said the sanctions would send “a strong message to anyone who holds government power anywhere that if you engage in the kind of brutal repression that we’ve seen in Libya in the last several days that the U.S. will do everything in [its] power to find and block assets.”