Republican State Rep. David Humason Jr. and Democratic City Councilor David Bartley of Holyoke will face off in the Nov. 5 election to succeed longtime western Massachusetts state Sen. Michael Knapik.

Bartley defeated Easthampton Mayor Michael Tautznik in Tuesday's preliminary election in the 2nd Hampden-Hampshire District. Humason defeated Michael Franco, Holyoke veterans' services officer.

Knapik, a Republican, served 22 years in the Legislature. He stepped down in August to become Westfield State University's executive director of university advancement.