In CS Lewis' book "The Last Battle", Aslan has the following discussion with a devoted follower of Tash:
"Then I fell at his feet and thought, Surely this is the hour of death, for the Lion (who is worthy of all honour) will know that I have served Tash all my days and not him. Nevertheless, it is better to see the Lion and die than to be Tisroc of the world and live and not to have seen him. But the Glorious One bent down his golden head and touched my forehead with his tongue and said, Son, thou art welcome. But I said, Alas, Lord, I am no son of thine but the servant of Tash. He answered, Child, all the service thou hast done to Tash, I account as service done to me. Then by reasons of my great desire for wisdom and understanding, I overcame my fear and questioned the Glorious One and said, Lord, is it then true, as the Ape said, that thou and Tash are one? The Lion growled so that the earth shook (but his wrath was not against me) and said, It is false. Not because he and I are one, but because we are opposites, I take to me the services which thou hast done to him. For I and he are of such different kinds that no service which is vile can be done to me, and none which is not vile can be done to him. Therefore if any man swear by Tash and keep his oath for the oath's sake, it is by me that he has truly sworn, though he know it not, and it is I who reward him. And if any man do a cruelty in my name, then, though he says the name Aslan, it is Tash whom he serves and by Tash his deed is accepted. Dost thou understand, Child? I said, Lord, thou knowest how much I understand. But I said also (for the truth constrained me), Yet I have been seeking Tash all my days. Beloved, said the Glorious One, unless thy desire had been for me thou shouldst not have sought so long and so truly. For all find what they truly seek."
An interesting side note. As I was looking for those quote, I found it in all places at a Fundamentalist Baptist web site which is devoted to warning people of the dangers of CS Lewis. I would post the link here, but I really don't want to encourage people to go there! :)
CS Lewis has a very generous understanding of grace as demonstrated in this passage.