Bedford lawyer Ken Gordon will face off against Burlington Selectman Walter Zenkin in the November election to determine who represents the 21st Middlesex District in the state House of Representatives.
Both men were write-in candidates who entered the race when state Rep. Charles A. Murphy, a Burlington Democrat, decided he would resign from the seat to take a job in the private sector. The disrtrict covers Burlington, Bedford and parts of Wilmington.
Murphy's name was still on the ballot because he had not resigned before Thursday's primary.
Gordon, a lawyer who specializes in workplace discrimination cases, was one of three Democratic write-in candidates. The others were both from Burlington - business consultant David Fionda and former Selectwoman Virginia Mooney.
Gordon came in first on the Democratic side picking up 919 votes according to unofficial returns. He beat out Murphy who got 724. Fiona came in third with 592 votes and Mooney fourth with 41.
Zenkin was unopposed on the Republican side, garnering 652 votes, more than the 150 needed by a write-in to make it on to the ballot.
Town by Town Breakdown of unofficial results provided by town clerks