Gunmen killed at least 25 people in Pakistan 's southern port of Karachi , raising tensions as voters cast ballots Sunday in a by-election to replace an assassinated lawmaker .