BOSTON — The major political question here is whether Representative Edward J. Markey, a longtime member of Congress whose liberal views generally reflect those of Massachusetts voters, could actually lose the special election for the Senate seat vacated this year by John Kerry.

Mr. Markey, 66, who was first elected to Congress in 1976, is facing Gabriel Gomez, 47, a Republican and untested political newcomer. Mr. Gomez has no policy experience but offers a compelling life story that includes service as a member of the Navy SEALs and a fighter pilot, a biography that he puts forth at every opportunity as he campaigns in his olive-drab bomber jacket.

Even asking whether a Republican could beat a Democrat in deep blue Massachusetts might sound preposterous, except that it happened three years ago. The circumstances in 2010, when Scott P. Brown won a special Senate election after the death of Senator Edward M. Kennedy, were different — voters were agitated, the Senate was closely divided, the Democrats were asleep at the switch. But it taught everyone here never to say never.

“It’s unlikely, but plausible,” said Jeffrey M. Berry, a political scientist at Tufts University. “Markey comes across as someone who has been in Washington a long, long time, and the theme that it’s time for a fresh face is appealing to voters.”