On Aug 27, 2005, two days before Hurricane Katrina made landfall, officials at the American Red Cross wrote to a top homeland security adviser at the White House, warning that the storm was likely to slam New Orleans as a major hurricane.

The message was sent to Kirstjen Nielsen, whose title was special assistant to the president for prevention, preparedness and response. She was 33 years old.

It was the first of many alarming emails Nielsen would receive over the following days as water poured into New Orleans and the city was deluged. And in the storm of blame that followed the costliest natural disaster in American history, Nielsen's team was widely criticized for its passive and clumsy response.

Twelve years later, President Trump has nominated Nielsen to the top job at the Department of Homeland Security. As DHS secretary, she would be in charge of a 240,000-employee agency with a $40 billion budget whose many responsibilities include managing disasters such as Hurricane Maria in Puerto Rico.

"There will be no on-the-job training for Kirstjen," Trump said Thursday as he announced her nomination at the White House, praising her "sterling reputation." He noted she would be the first DHS secretary to have previous experience at the agency.

“She is ready on day one,” Trump said.

Nielsen’s exact role in the Katrina episode remains unclear, but the ordeal could leave her facing tough questioning during her Senate confirmation hearings, which are likely to be held in the next few weeks.

Rep. Bennie Thompson (D-Miss.), the ranking Democrat on the House Homeland Security Committee, sent a letter Thursday to Sen. Ron Johnson (R-Wis.), chairman of the Senate committee that will question Nielsen, expressing his “serious concern” about her fitness for the role.

“While I am pleased the President has finally named a nominee for this critical national security position, I am greatly troubled by Ms. Nielsen’s record,” the letter stated. “Given the ongoing tragedy in Puerto Rico and the U.S. Virgin Islands, along with other homeland security challenges facing our Nation, the Department of Homeland Security must have a proven, capable leader as Secretary.”

“Unfortunately, Ms. Nielsen’s record raises questions about her suitability for such a position,” he wrote.

Former DHS and White House officials who worked with Nielsen during Katrina said it would be grossly unfair to hold her responsible for the Bush administration’s botched response to a calamity that killed more than 1,800 and drove a million Americans from their homes.

Former colleagues remember her and her small staff of about five aides working around the clock as a torrent of information — some of it erroneous — poured into the White House while the catastrophe played out on live television.

If anything, Nielsen’s defenders say, the Katrina episode left her a front-row seat to the country’s most notorious case of federal emergency mismanagement. If she can articulate what she learned from the episode to senators at her confirmation hearings, she has the chance to turn a black mark on her career into an asset.

“She started off with the Super Bowl,” said Matthew Broderick, the retired Marine Corps general who was in charge of the Homeland Security Operations Center during Katrina, and resigned several months later. “Usually with these things you get a few games to work your way up.”

Broderick said Nielsen’s job was mostly to serve as a traffic cop for information during the chaotic days following the storm, and he remembers her “doing a great job.”

“She wasn’t in charge of anything, so all she could do was react to the requests we were making and make sure they were completed as smoothly as possible,” Broderick said. “She couldn’t control what was going on — only mitigate it.”

Nielsen, who is currently the deputy chief of staff at the White House, did not respond to interview requests. But in the post-Katrina autopsies produced by House and Senate bipartisan committees, which together run more than 1,300 pages, Nielsen’s name repeatedly comes up.

In the months before the storm, Nielsen was one of a handful of White House officials warned of the so-called “New Orleans scenario”: a hurricane rated Category 3 or higher hitting the city and bursting its aging levees.

The 582-page bipartisan House report, "A Failure of Initiative," specifically faults Nielsen's White House team for failing to recognize the threat to New Orleans from Katrina and conveying the gravity of the situation after the storm hit.

“I don’t want to underplay it, but she was like the rest of us,” said Gail Kulisch, a retired Coast Guard officer who was an aide to then-DHS Secretary Michael Chertoff during Katrina. “We were busy staffers trying to do the king’s business.”

Even after the lone Federal Emergency Management Agency official sent to New Orleans alerted Nielsen and other White House staffers of broken levees, residents trapped on roofs and corpses floating in the streets, there was little detectable urgency from President George W. Bush and Chertoff. The DHS secretary went to Atlanta to attend a conference on avian flu; Bush gave a speech in California and was photographed happily strumming a guitar.

“It does not appear the president received adequate advice and counsel from a senior disaster professional,” the House report concluded.

Nielsen was supposed to be that professional on his staff.

"Despite the clear warnings before landfall that Katrina would be catastrophic, the President and the White House staff were not sufficiently engaged and failed to initiate a sufficiently strong and proactive response," a group of Democratic senators wrote in a section of the 737-page Senate report "Hurricane Katrina: A Nation Still Unprepared."

Nielsen’s team was singled out for failing to properly manage the flow of urgent on-the-ground reports sent to the White House.

The White House staff did not fully engage the president or “substantiate, analyze and act on the information at its disposal,” the House report concluded, noting Nielsen’s team failed to confirm the collapse of New Orleans’s levee system on Aug. 29, the day of Katrina’s landfall.

Frances Townsend, who was Bush’s top homeland security adviser during Katrina and Nielsen’s boss, defended her protegee’s performance. “You have information coming in from all different places, so you’re trying to discern what’s true and what isn’t, or what were real needs and what aren’t,” she said. “In fairness to Kirstjen, we were being overrun.”

Townsend, who has been a prominent public supporter of Nielsen’s nomination to DHS secretary, said Katrina taught Nielsen and others critical lessons about the way the federal government handles emergencies and natural disasters. Chains of command are clearer. Disaster declarations are now made in advance. DHS agencies have learned to “pre-position” abundant supplies into disaster zones ahead of time.

And the biggest lesson, Townsend said, is that the federal government “isn’t a good first responder. In Katrina and Maria, the ability of state and local authorities to respond is “the biggest determinant of your success,” she said.

The House report on Katrina found exactly that, recommending that the federal government, and especially the Defense Department, must move quickly to fill in for state and local authorities when they are incapacitated by the disaster.

It’s the same scenario that has played out once more in Puerto Rico, where DHS and FEMA officials say they did not expect to have to assume so much responsibility.