(CNN) Baltimore officials knew protests could erupt the day of Freddie Gray's funeral but were overwhelmed by the riots that followed.

Those are some of the details found in 7,000 pages of government emails the city released Monday. The documents were turned over after a public records request by CNN.

Violence engulfed Baltimore on April 27, the day of Gray's funeral. The 25-year-old Baltimore man died in police custody after suffering a severe spinal cord injury while riding in a police van

What started as largely peaceful protests in the days leading up to the funeral devolved into assaults on police, looting, arson and the devastation of businesses.

The emails reflect, in part, what then-Baltimore Police Commissioner Anthony Batts told CNN in early May

Batts acknowledged that Baltimore police were not prepared for massive demonstrations, particularly once they turned violent.

He said his officers sometimes lacked the shields, helmets and other gear they needed. At one point, officers advanced uphill against a rowdy group of protesters, at a disadvantage, Batts said. And his department hadn't prepared for moving platoons of 200 to 300 officers at a time.

Baltimore Mayor Stephanie Rawlings-Blake removed Batts from his job earlier this month.

Rawlings-Blake was roundly criticized for how she initially responded to the rioting when she said, "While we tried to make sure that (protesters) were protected from the cars and the other things that were going on, we also gave those who wished to destroy space to do that as well."

She quickly clarified what she meant was that city officials needed to perform a "balancing act" at keeping order and arresting rioters while letting protesters who were deeply hurt and angry express themselves.

Early hints of riots

The emails seem to show a fair amount of waiting.

In the hours leading up to the riots on April 27, a flurry of emails flew between city officials. By then, word had spread on social media of a massive student gathering at Mondawmin Mall.

JUST WATCHED Baltimore officer: 'We were scared' during riots Replay More Videos ... MUST WATCH Baltimore officer: 'We were scared' during riots 05:02

Some had talked about a "purge" -- an apparent reference to the movie "The Purge" in which one day each year, all laws are suspended for a 12-hour period and all crimes, including murder, become temporarily legal.

"Pat has received reports that children will possibly riot after school starting at 3p down from Mondawmin to North Ave and to downtown," Olivia D. Farrow of the city's health department wrote at 1:52 p.m.

"Staff at Druid becoming concerned. May need to close early. Waiting to see if rumor or if something seems to begin happening. She will keep us posted."

Several more emails from city officials followed, expressing concern about possible violence and asking whether city employees could leave early. There was no apparent answer to the email chain.

Desperation amid the mayhem

Hours later, as the nation watched the riots on TV, Drew Vetter, Baltimore police director of government affairs, updated other city officials late into the night.

JUST WATCHED Baltimore Police Commissioner Anthony Batts fired Replay More Videos ... MUST WATCH Baltimore Police Commissioner Anthony Batts fired 01:26

"As of this message, rioters are continuing to set fires to businesses and properties around the City," Vetter wrote at 3:11 a.m. April 28. "However, the pace has slowed considerably and the City is now largely quiet."

He said about 20 officers were injured, and some were hospitalized. And there were signs of more chaos to come.

"As of now, we have information that rioters will continue to target shopping and commercial districts, specifically Security Square Mall and Towson Town Center," he wrote. "Please implore all parents and other members of your community to keep their kids home tomorrow. Thank you."

It also appears that the department was open to having its own actions monitored.

Amnesty International USA sent an email to Batts asking if the organization could send a delegation of observers to make sure that human rights standards were met during policing. The group wanted their monitors to be exempt from the citywide curfew. A Baltimore Police Department memo was issued May 2 laying out guidelines on what to expect from 10 Amnesty International employees who planned to visit.

Confusion over the curfew

The decision by Rawlings-Blake to enact a weeklong curfew from 10 p.m. to 5 a.m. drew an array of responses.

JUST WATCHED Community activist on violence in Baltimore protests Replay More Videos ... MUST WATCH Community activist on violence in Baltimore protests 03:38

"I am wondering if you can provide any information on the curfew," wrote Abigail Janssens, co-owner of The 8x10 music venue. "We don't open our tavern until 8:00 PM so this is huge for us. Losing a week of business is equivalent to losing at the very least ¼ of my income for the month."

Michelle Bailey-Hedgepeth of Baltimore's Board of Liquor License Commissioners responded a few hours later.

"At this point, we understand the curfew to be for all operations and all ages throughout the City of Baltimore," she wrote on April 28. "I know that this poses a hardships to many of our licensees but, due to the recent events this is something that we must follow. We are asking that licensees follow the directives of the City to ensure public safety."

Deputy Mayor Colin Tarbert also clarified the rules, saying anyone who had to work in "essential business operations" past 10 p.m. must have documentation from his or her employer.

"Non-essential business operations should be suspended from 10:00 p.m. until 5:00 a.m.," Tarbert wrote on April 28. "This includes restaurants, entertainment venues and bars, which should be closed during these times. Please ensure visitors and patrons have enough time to travel before the curfew begins."

The curfew was lifted May 3.

Businesses devastated

The emails also highlighted the loss of income to businesses and tourist attractions during the upheaval.

A Baltimore firefighter inspects a burned CVS store on April 28. About 200 businesses were lost in the riots.

The National Aquarium suffered an 80% drop in visitors and a $500,000 loss the week after the riots, CEO John Racanelli wrote. The Maryland Science Center saw a 90% drop in attendance, he said.

Several people warned about rioters turning business' outdoor furniture into weapons. Sarah St. Clair of Baltimore's Waterfront Partnership wrote that "people are using the furniture to break windows."

"Our window at Columbus Center got smashed too," Laurie Schwartz of the Waterfront Partnership added.

One of the most disastrous sights was the looting and arson of a CVS store. But perhaps those who suffered the most were the small, local businesses.

"This event has been devastating to the City as a whole, and in particular to our small business community," City Council member Eric Costello wrote on May 1. "This is an unprecedented time in Baltimore City and our Nation. We all want to return to a state of normalcy as soon as humanly possible. I realize that this response may be frustrating, but please know that I have advocated for your positions."

JUST WATCHED Officers charged in Freddie Gray's death want to move trial Replay More Videos ... MUST WATCH Officers charged in Freddie Gray's death want to move trial 01:34

By the time the protest violence stopped, more than 480 people had been arrested and more than 110 officers had been injured, Baltimore police said.