Newly-released documents from the National Oceanic and Atmospheric Administration (NOAA) show officials reacting with frustration to President Donald Trump’s repeated claim last fall that Hurricane Dorian might hit Alabama, despite the fact that scientists inside the agency disagreed with him.

The documents — which include over 1,000 emails — were released late Friday night in response to a Freedom of Information Act (FOIA) request filed by BuzzFeed News and other publications. BuzzFeed News Investigative Reporter Jason Leopold posted a Twitter thread of his findings on Friday night.

Back in early September, Hurricane Dorian was headed towards the U.S. after devastating the Bahamas and killing dozens. On Sept. 1, President Trump tweeted that Hurricane Dorian was on a path to hit multiple southern states, including Alabama. (Dorian did not end up hitting Alabama, but skirted the coast of Florida and Georgia.)

The National Weather Service (NWS) in Birmingham, Ala., quickly responded that he was wrong, tweeting, “Alabama will NOT see any impacts from #Dorian. We repeat, no impacts from Hurricane #Dorian will be felt across Alabama. The system will remain too far east.”

The President then doubled down on his claim that Alabama was at risk. On Sept. 4, he gave an update on the storm while sitting in front of a map that appeared to have been altered with a black marker to make it seem like Alabama might be hit.

President Trump references a map with the storm's forecast that appears to have been altered by a black marker to extend the hurricane's range to include Alabama. The photo was taken on Sept. 04, 2019 in Washington, DC. Chip Somodevilla/Getty Images

Public backlash ensued, and the moment was swiftly deemed #sharpiegate on social media. On Sept. 6, NOAA released a statement that seemed to back the White House and disown the Birmingham station’s tweet.

The unsigned statement read, “From Wednesday, August 28, through Monday, September 2, the information provided by NOAA and the National Hurricane Center to President Trump and the wider public demonstrated that tropical-storm-force winds from Hurricane Dorian could impact Alabama. The Birmingham National Weather Service’s Sunday morning tweet spoke in absolute terms that were inconsistent with probabilities from the best forecast products available at the time.”

Many experts — such as a former NOAA chief operating officer and a former branch chief of NOAA’s Hurricane Specialist Unit — decried the statement on social media.

The newly-released emails uncovered by the FOIA request show that there was also confusion, frustration and anger inside the agency as the controversy played out.

Emails on Sept. 4 show officials reacting to the President’s apparently-altered map, writing, “Note that the [National Hurricane Center] forecast product includes an extra black line over Alabama. Do we know what day this product was from, and whether the AL portion was included on our original product?”

Another email from an hour later shows officials being told to not to publicly respond to the White House’s claims about the storm’s path.

Multiple emails show that some NOAA officials believed the White House doctored the image of Dorian’s path. An email from NOAA communications official Corey Pieper confirming that “yes, that [advisory] was doctored.” Another email from Sept. 4 shows officials discussing a press request, asking, “How do you want to handle this one? Looks like someone at the WH drew with a market on the images of our official forecast.”

Another Sept. 4 email discussing a press request said simply: “HELP!!!”

More emails confirm that people inside NOAA thought the White House doctored the Sept. 4 map. In one email from Sept. 5, NOAA official Makeda Okolo writes, “Apparently the President is convinced that Alabama was in the path of Dorian and someone altered a NOAA map (with a sharpie) to convince folks.”

Benjamin Friedman, NOAA’s Deputy Under Secretary for Operations, responds, “yep, crazy.”

On Sept. 6, in response to NOAA’s statement disavowing the NWS Birmingham tweet correcting the President, NOAA employee Alek Krautmann writes to communications official Scott Smullen, “I’m reaching out just to help provide feedback from the agency. This statement is deeply upsetting to NOAA employees that have worked the hurricane and not fully accurate based on the timeline in question.”

On Sept. 7, NOAA acting Chief Scientist Craig McLean also addresses the statement. In an email to other top officials he writes, “For an agency founded upon and recognized for determining scientific truths, trusted by the public and responsible in law to put forward important science information, I find it unconscionable that an anonymous voice inside of NOAA would be found to castigate a dutiful, correct, and loyal NWS Forecaster who spoke the truth.”

“What concerns me most is that this Administration is eroding the public trust in NOAA for an apparent political recovery from an ill timed and imprecise comment from the President,” the letter goes on.

Email exchanges from later that week show how frustrated officials were with the White House’s discussion of the storm.

NOAA Assistant Secretary of Commerce for Environmental Observation and Prediction Dr. Neil Jacobs wrote in an email, “You have no idea how hard I’m fighting to keep politics out of science. We are an objective science agency, and we won’t and never will base any decision on anything other than science.”

Another official wrote, “People across agency are hurting… not just those directly involved. Some employees have lost their minds I fear. Trying to maintain calm and focus[.]”

After posting a thread of some of his findings, Leopold tweeted, “I’ve been waiting 3 years to see if I could use #FOIA to get a candid look inside a govt agency that found itself in turmoil over something Trump tweeted. Never thought it would be NOAA.”

The White House declined to comment for this article. NOAA did not immediately respond to TIME’s request for comment.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Madeleine Carlisle at madeleine.carlisle@time.com.