Authorities say the attack happened Tuesday in the Swat Valley , near the border with Afghanistan .