Responding to brutal attacks on judges, their families and co-workers, the House voted to set aside $40 million a year to upgrade courthouse security and slap sentences ranging from 30 years in prison to the death penalty on anyone convicted of such a crime.

Supporters said the bill passed 375-45 on Wednesday because recent courthouse killings in Chicago, Atlanta and Tyler, Texas, highlighted the need for tough deterrents against those who might try to intimidate or punish officers of the court, witnesses and informants.