BAKU , Azerbaijan ( AP ) - A young man armed with an automatic pistol and clips of ammunition rampaged through a prestigious institute in the Azerbaijani capital Thursday , killing 12 people and wounding others before killing himself as police closed in , the government said .