Throughout both the Hobbit and Lord of the Rings (and I need to stress that I'm talking about the books, not the movies) we see Gandalf quite liberally tossing magic about.
- He uses lightning in his battles with the Nazgul (on Weathertop) and the Balrog (in and above Moria).
- He regularly ignites fires.
- He casts light from his staff.
- He uses spells to (attempt to) open doors, to close doors (even bragging about how many of the former he knows).
- He speaks "words of command".
- He casts shafts of white light at flying Nazgul.
And many more examples.
Yet, as a member of the Istari he is supposed to be restricted from using power. He is supposed to inspire, encourage, and get results primarily through the actions of other people.
Now, I consider myself quite well-read in my Tolkien, but I'm having some difficulty reconciling the two. What's going on there, then?
Answers I'm looking for would include sourced quotes that need not go so far as to explain this exactly, but at least support it's plausability.