In an unexpected defeat for the gun lobby, the Senate on Wednesday voted narrowly to kill an amendment that would have allowed gun owners to carry concealed firearms across state lines so long as they have valid permits or permission from their state of residence to do so.