FLINT, MI -- President Obama made a vow to people filling the Northwestern High School gymnasium and tens of thousands others across the city that every drop of water in the city flowing to Flint homes would be safe.

He called the need for clean water part of the "basic government responsibility" and said he wants to make sure it's safe to drink, cook and bathe in.

Obama stressed the water is safe to drink with a filter, sipping from a glass of water on a raised platform on the gym floor after he began coughing at one point in the speech.

"The bad news is this should not have happened in the first place," Obama said, calling the water crisis going on for more than two years an avoidable, preventable occurrence and pointed out government officials weren't as attentive as they should have been.

Obama told the room he did not believe that anyone consciously wanted to hurt the people of Flint and that his speech was not going to be a platform to "resolve every screw-up that happened" over the last two-plus years.

Some of the issues that led to the crisis, Obama said, were underinvestment in pipes and bridges, emergency manager decisions to cut costs, and the disregard for poor, underprivileged communities.

Addressing the city's residents on a whole, Obama said "While you are waiting to get your pipes replaced, you need to have a filter installed and use that filter and if you do use that filter then the water is safe to consume for children over the age of 6 and women who are not pregnant."

A member of the crowd disputed the president's remarks, to which Obama told him if the scientists he has on his staff were to steer him wrong that person would be out of a job.

Obama held a community roundtable earlier in the day, speaking with residents about their accounts on the water crisis and recalled the words laid on him from a pastor.

"It made us feel like we didn't count and you can't have a democracy where people feel like they don't count," he said, wanting to reassure those in the crowd he would not back off the issue.

"I told them that I understood why you'd be afraid, not just for yourself but for your kids," Obama said. "I also wanted her to come tell you that I've got your back."