Sen. Edward J. Markey was first elected to the district in 1976. But he vacated the seat this spring when he ascended to the Senate to succeed now-Secretary of State John Kerry. His departure sparked this special-election contest.