When Lester Brown spotted a teacher queuing at Walmart to buy a stack of spiral notebooks for her pupils he knew exactly what to do with the hundred dollar bill in his pocket.

He paid for the lot in a selfless act that has since warmed hearts around the world as the tale went viral.

“It was the right thing to do. It’s what God said to do and it’s that simple,” he told KENS 5 TV.

Standing in front of him in the queue that day was Sabrina Drude, a teacher at Scobee Middle School in San Antonio, Texas.

“I paid it and then she started to cry,” he said. “And then she was going to make me cry, so I looked away.”

The bill came to $97 dollars - a sign from God, is how Mr Brown described it.

“I remember I had this hundred-dollar bill with the intention of responding to something in need, and God said to respond,” he said.

At first Ms Drude said she did not know the identity of her good Samaritan, but an appeal by the local TV channel soon tracked down the mystery donor.

She said: “He inspired me and so many others to be kinder and do whatever you can for your fellow human.”

Mr Brown, a father of five and a pastor, said he wanted everyone to know they could play a part in making a difference to the world.

“I challenge you, whatever it is you can afford, to volunteer at a school, help a family,” he said.