Sanfilippo syndrome is a mucopolysaccharidosis (MPS) caused by a lysosomal enzyme defect interrupting the degradation pathway of heparan sulfates. Affected children develop hyperactivity, aggressiveness, delayed development, and severe neuropathology. We observed relevant behaviors in the mouse model of Sanfilippo syndrome type B (MPSIIIB), in which the gene coding for alpha-N-acetylglucosaminidase (NaGlu) is invalidated. We addressed the feasibility of gene therapy in these animals. Vectors derived from adeno-associated virus serotype 2 (AAV2) or 5 (AAV5) coding for NaGlu were injected at a single site in the putamen of 45 6-week-old MPSIIIB mice. Normal behavior was observed in treated mice. High NaGlu activity, far above physiological levels, was measured in the brain and persisted at 38 weeks of age. NaGlu immunoreactivity was detected in neuron intracellular organelles, including lysosomes. Enzyme activity spread beyond vector diffusion areas. Delivery to the entire brain was reproducibly obtained with both vector types. NaGlu activity was higher and distribution was broader with AAV5-NaGlu than with AAV2-NaGlu vectors. The compensatory increase in the activity of various lysosomal enzymes was improved. The accumulation of gangliosides GM2 and GM3 present before treatment and possibly participating in neuropathology was reversed. Characteristic vacuolations in microglia, perivascular cells, and neurons, which were prominent before the age of treatment, disappeared in areas in which NaGlu was present. However, improvement was only partial in some animals, in contrast to high NaGlu activity. These results indicate that NaGlu delivery from intracerebral sources has the capacity to alleviate most disease manifestations in the MPSIIIB mouse model.