Patricia Sullivan / The Washington Post

WASHINGTON — Each night for 24 years, Emma Daniel Gray would diligently clean the White House. When she came to the president’s chair, she would pause, cleaning materials in hand, and say a quick prayer.

The prayers asked for blessings, wisdom and safety for each of the six presidents she served.

It’s a “Backstairs at the White House” moment, a story that could have come from the 1979 Emmy Award-winning miniseries about the professional household staff to the presidential families. Like the characters in that television show, Gray took great pride in her work, traveling each day by public transportation from her home here to the residence of one of the most powerful men in the world.

She worked nights, in the executive offices. Her official title was charwoman, from the time she started with the government in 1943 until her retirement in 1979. The first decade or so, she was assigned to what is now called the Government Accountability Office and a handful of other agencies. In 1955, she was transferred to the White House “because of her working habits, because of her excellent work,” said one of her daughters, Lillie Collins, of Forestville, Md. “It wasn’t just her work, it was her character.”

That nightly pause for prayer was in keeping with her habits of a lifetime.

A member of Holy Trinity Worship Center International in Washington, she “loved President Carter because she felt he prayed a lot,” her daughter said, and she treasured a photograph of her shaking hands with him, as well as an autographed picture of her with Rosalynn Carter. President Kennedy may have been her next favorite, because of the Christmas parties his administration threw for workers and their families, occasions that her children remember for Gray’s insistence that they dress up and behave properly.

“She was a lady, a Christian lady,” her daughter said.

Her pastor, Bishop Royce Woods, agreed.

“She had a great deal of energy. She was the type of person who could pull it from somewhere to make you smile, and make you feel it wasn’t that bad, and it could be a better day,” he said, describing how others sought her out for advice and counsel.

“She saw life through the eyes of promise is the way I’d put it,” he added. “You can always look around and find reasons to be (unhappy) ... but you couldn’t be around her and not know what she believed. She always believed there was a higher power to grab onto that would lift you above any circumstance, and she was always able to do that.”

Emma Daniel was born April 16, 1914, in Edgefield, S.C., and was raised by her grandfather, who had been a slave.

“He was sold three times,” she told the Prince George’s (Md.) Journal newspaper about 10 years ago. “He paid his boss’s son 20 cents to teach him to read, and when he could read, he loved the Ten Commandments so much that people in the town began calling him Uncle Ten.” When Gray would visit her hometown, residents would usually ask, “Aren’t you Uncle Ten’s granddaughter?”

She married William Gray, also from South Carolina, and they came to Washington in 1943, part of a wave of black Southerners who sought opportunity in the nation’s capital during World War II. Her husband, who worked as a custodian at the Government Printing Office, died in 1966. She never remarried. She had seven children, two of whom have died, Willie Mae Gray in 1997 and Lewis Gray in 2000.

But in a larger sense, her family expanded and prospered. When she died, at 95, on June 8 of leukemia at Gladys Spellman Specialty Hospital & Nursing Center in Cheverly, Md., she was the matriarch of six generations.

In addition to her daughter Lillie, survivors include four children, George Gray, of Hyattsville, Md., Amanese Hemphill, of Capitol Heights, Md., Janie Stevens, of Forestville and Mamie Gentry, of Washington; 35 grandchildren; and 61 great-grandchildren. There are too many great-great-grandchildren and great-great-great-grandchildren to count, the family said.

In retirement, Gray took her only airplane trip, to Hawaii. Her family and friends treasured her cooking, especially her specialty, sweet potato pie. And she had a way of boosting the spirits of everybody.

“She learned early that you set the tone for your environment,” Woods said. “That’s why church was so important to her. She understood it to be that kind of institution, that was conducive to what you needed spiritually, emotionally and sometimes financially. ... She preached her own eulogy by the life that she lived.”