The city of Honolulu will pay a $100,000 fine for mistakes that triggered three sewage spills in August 2015.
Heavy rains caused sewer overflows in Kailua and Kaneohe.
But the by far largest spill happened near Ala Moana Beach Park, where 500,000 gallons of raw sewage covered the streets.
State health department and Honolulu officials say a broken pump combined with city employee errors led to the discharge, one of the largest waste water spills in the state's history.
Now, more than a year and a half later, the city and state announced an agreement to prevent it from happening again.
According to health officials, the biggest mistake the city made was deactivating an alarm at the Ala Moana Pump Station before crews were told there was a problem.
"This was an emergency. There were mistakes done, but nothing was intentional," said Lori Kahikini, city Environmental Services director.
The city confirmed an undisclosed number of its employees were disciplined for their role in deactivating the alarm but no one was fired.
The signed agreement sets new rules for how to handle a similar alarm.
"So the procedures that were changed immediately even before we signed it was you can't deactivate it. You need to physically call that division," Kahikini said. "He needs to physically be at the pump station and say, 'Yeah, I got it you can deactivate the alarm.'"
Over the next year the city will have to install new software at it's command center that's designed to improve communication in the event of an emergency. In addition to upgrading its technology the city is also responsible for finding out why so much storm water is getting into the sewer system.
"That flow that's coming in, it's fast, it's instantaneous," said Kahikini.
They'll have a year to figure out where it's coming from and fix it.
Health officials say since negotiations began they're pleased with the city's progress.
"Today I think they actually deserve credit," said Stuart Yamada, of the state Department of Health's Chief Environmental Management Division. "Since those events occurred there's been numerous major rainfall events but we haven't seen a repeat of this kind of spill or discharge."
It's not yet clear how much all of the repairs and upgrades will cost. But officials confirm taxpayers can expect to see an increase on their wastewater fees for sewer upgrades sometime next year.