Massachusetts Democrat Rep. Ed Markey ended Republican hopes for a second blue-state Senate upset Tuesday, defeating GOP candidate Gabriel Gomez in a special election.

Markey, 66, has represented the western Boston suburbs in Congress since 1976.