At least 41 people have been killed and nearly one million others displaced on both sides, officials said.