Here we report the identification of a glycogen phosphorylase (glgP) gene in the plant growth-promoting rhizobacterium Azospirillum brasilense, Sp7, and the characterization of a glgP marker exchange mutant of this strain. The glgP mutant showed a twofold reduction of glycogen phosphorylase activity and an increased glycogen accumulation as compared with wild-type Sp7, indicating that the identified gene indeed encodes a protein with glycogen phosphorylase activity. Interestingly, the glgP mutant had higher survival rates than the wild type after exposure to starvation, desiccation and osmotic pressure. The mutant was shown to be compromised in its biofilm formation ability. Analysis of the exopolysaccharide sugar composition of the glgP mutant revealed a decrease in the amount of glucose, accompanied by increases in rhamnose, fucose and ribose, as compared with the Sp7 exopolysaccharide. To the best of our knowledge, this is the first study that demonstrates GlgP activity in A. brasilense, and shows that glycogen accumulation may play an important role in the stress endurance of this bacterium.