The gunman who shot dead three elderly women as he prowled a New Mexico neighborhood firing at cars this week had legally purchased an assault-style rifle, one of three weapons he used in the rampage, a month after he turned 18, police said on Tuesday.