It’s a shame that it took a young man’s death to get the nation’s attention, but at least that seems to be happening. Trayvon Martin was killed and his shooter went free, in part because of the atrocity known as “stand your ground” laws. Now, even some Republicans are questioning those laws, and prominent among them is Sen. John McCain of Arizona, a state with its own version of that misbegotten law.

Florida’s stand your ground law was never formally invoked in the trial of George Zimmerman, but it permeated everything from the day Martin walked through Zimmerman’s gated community to the still-reverberating aftermath of the trial. The law excuses an armed individual, who is in a place where he is entitled to be, from retreating safely if faced with a perceived threat to his life, and authorizes his use of deadly force.

Many observers believe that law is what gave Zimmerman the impetus to confront Martin, even after a police dispatcher warned him not to do so. The jury that acquitted him believed Zimmerman was ultimately acting in self-defense, after the unarmed Martin stood his own ground.

Indeed, in President Obama’s thoughtful comments on the reaction of African-Americans to the verdict – comments that McCain praised – the president made that very point, saying, “I’d just ask people to consider, if Trayvon Martin was of age and armed, could he have stood his ground on that sidewalk? And do we actually think that he would have been justified in shooting Mr. Zimmerman, who had followed him in a car, because he felt threatened? And if the answer to that question is at least ambiguous, then it seems to me that we might want to examine those kinds of laws.”

That’s what McCain is also counseling as Americans consider the terrible consequences of stand your ground. Speaking Sunday on CNN’s “State of the Union,” he said he believes these laws should be reviewed in light of the Martin shooting, and that he believes the Arizona legislature will take that step.

The intent of these laws may have been defensible, in vesting authority with peaceable citizens against those who threaten them. But in practice, they authorize vigilantism, such as Zimmerman committed, leading to the tragic and unnecessary death of a teenager.

Even some prosecutors are suspicious of the law. Former Broward County prosecutor David Frankel spoke to the Sun-Sentinal after a different stand-your-ground shooting in Florida last year: “It is an abomination. The ultimate intent might be good, but in practice, people take the opportunity to shoot first and say later they had a justification. It almost gives them a free pass to shoot.”

That may or may not have been the intention of the National Rifle Association, which pushed for these laws, but it is what is happening. Laws should be designed to protect law-abiding Americans, but they should also be focused on discouraging unnecessary violence. The confrontation between Zimmerman and Martin was certainly unnecessary.

What is the downside of requiring threatened people, even armed ones, from retreating rather than shooting, if they can safely do so? Under these laws, it won’t be long – if it hasn’t already happened – until a bystander is cut down by an individual standing his ground.

These laws are disastrous and a discredit to the states and elected officials who support them. We hope more elected leaders use the cover provided them by Obama, McCain and other to push for change, before someone else is needlessly killed.