Both houses of Congress are moving swiftly on legislation spawned by the Oklahoma City bombing and a Ku Klux Klan killing in Alabama to prevent murderers from receiving military honors at their funerals.

In a 416-0 vote, the House approved Monday an amendment by Rep. Spencer Bachus, R-Ala., to deny military funeral benefits to anyone convicted of a state or federal crime in which death is a possible punishment or who has been sentenced to prison without parole.The Senate last week passed a similar measure 98-0 amid concern that Timothy McVeigh, convicted in the Oklahoma City bombing, could be buried in a national military ceremony with full honors.

Bachus said another high-profile crime prompted his proposal: the 1981 slaying of a black Mobile, Ala., teenager by Ku Klux Klan members. Henry Francis Hays, executed earlier this month in connection with the murder, was buried in a Mobile cemetery with a military honor guard, a 12-gun salute and a flag-draped coffin. The honor stemmed from Hays' brief stint in the Army in the early 1970s.

The victim, Michael Donald, was chosen by the Klansmen at random following the killing of a white Birmingham policeman. He was beaten, his throat was slit and he was hanged.

Newspaper photographs of Hays' burial ceremony sparked sharp criticism in Mobile of the practice of providing military honors with no apparent regard to later actions of the veteran.

"In a military ceremony, we said to our children and our grandchildren, `We're overlooking this (crime), this is a good soldier," Bachus said. The incident, he said, caused people to ask, "Who is entitled to a hero's funeral? Who are our heroes?"

A Denver jury June 13 sentenced McVeigh to die for the 1995 bombing of the federal building in Oklahoma City that killed 168 people. He has made no public statements about where he wants to be buried if executed.

Members of Congress have been angered by speculation that Mc-Veigh might use his status as a decorated veteran of the Persian Gulf War to obtain a burial with full military honors at Arlington National Cemetery or some other military burial ground.