Paul Leka, the songwriter and record producer who co-wrote “Na Na Hey Hey (Kiss Him Goodbye),” a song whose catchy refrain has become a favorite taunt of millions of sports fans, died of lung cancer Oct. 12 at a hospice in Sharon, Conn. He was 68.

His death was confirmed by his sister-in-law, Gerri Leka.

As a producer, Mr. Leka’s credits covered a wide range — the soft rock of such 1960s groups as the Left Banke and the Peppermint Rainbow, the easy listening orchestras of Peter Nero and Paul Mauriat, and singer-songwriter Harry Chapin. For Chapin, Mr. Leka produced four albums, including 1974’s “Verities & Balderdash,” which yielded Chapin’s signature song, “Cat’s in the Cradle.”

Mr. Leka is best remembered for his accidental success with “Na Na Hey Hey,” a No. 1 record on the Billboard charts in 1969. It was resurrected in 1977 when Nancy Faust, the organist for the Chicago White Sox, started playing the refrain whenever the opposing batter struck out or the opposing team’s pitcher was removed from the mound.

The singalong — “na na na na, na na na na, hey hey, goodbye” — has since been taken up by countless people at baseball, football and soccer games. However, as initially written, the song was intended to fill up the B-side of a record for singer-songwriter Gary De Carlo.

With co-writers De Carlo and Dale Frashuer, Mr. Leka dug out a song that he had abandoned some years earlier. He put a new chorus at the beginning and end, bringing the song to four minutes in length — too long for airplay on Top 40 radio.

“I started writing while I was sitting at the piano, going ‘na na na na, na na na na . . .’ ” Mr. Leka said in Fred Bronson’s book “The Billboard Book of Number One Hits.” “Everything was ‘na-na’ when you didn’t have a lyric. . . . We agreed the song was just a B-side and said . . . let’s leave those lyrics in.”

They recorded and mixed the song cheaply in one evening — so cheaply that Mr. Leka played keyboards over the drum track from another song.

But Mercury executives loved the record. They released it under a fictitious band name, Steam, because singer De Carlo did not want it to compete with the other songs recorded under his stage name, Garrett Scott. Mr. Leka came up with the band name as he watched steam rise from a manhole while leaving the studio.

Paul Theodore Leka was born Feb. 20, 1943, in Bridgeport, Conn., to Albanian immigrants. His father was a short-order cook.

While in high school, he sang in a vocal group, the Chateaus, with future writing partners De Carlo and Frashuer but eventually left performing to concentrate on songwriting and record production.

One of his early successes as a songwriter came in 1967, when he and Shelley Pinz co-wrote “Green Tambourine” for the Lemon Pipers, a psychedelic pop band.

His first marriage, to Rosemary Gajnos, ended in divorce. Survivors include his wife of seven years, Engjellushe Qafa; two children from his first marriage; a son from his second marriage; a brother; and a sister.