The election, in an area long known for violent separatists, was marred by a shootout that killed three, officials said.