Four civilians and three police officers were killed in the attack, which officials say is now over.