OKLAHOMA CITY — A pastor whose legislator wife has made incendiary comments about minorities and gays has lost a runoff election for a seat in the Oklahoma state Senate.

Anesthesiologist Ervin Yen defeated Steve Kern in a runoff election for the Republican nomination to the District 40 Senate seat in Oklahoma City. Yen faces Democrat John Handy Edwards in the Nov. 4 general election.

Kern is an evangelical pastor and husband of Republican state Rep. Sally Kern, who made national headlines in 2008 when she said gay people pose a greater threat to the country than terrorism.

Last year, Steve Kern led a rally of pastors to protest a biblical satire with “homosexual themes” being performed in Oklahoma City and prayed that God’s “mercy would withhold his justice” in punishing the city.

Two years ago, Sally Kern was reprimanded by the House and apologized on the House floor after denigrating blacks and women during debate on an affirmative action bill.

Sally Kern did not draw a challenger this year.

Associated Press contributed to this report.