Catalyzes the ATP-dependent biosynthesis of glutamine from glutamate and ammonia. ATP + L-glutamate + NH4(+) = ADP + H(+) + L-glutamine + phosphate Binds 2 Mg(2+) ions per subunit. Inhibited by L-histidine (46%), L-arginine (38%) and L-methionine-DL-sulphoximine. The activity of this enzyme is not controlled by adenylation. Homohexamer. Belongs to the glutamine synthetase family.