To work with Cloris Leachman was nothing less than liberating. That’s how writer-director James L. Brooks remembered his collaborations with the beloved actor who died Jan. 26 at the age of 94.

“Life was not as confining when she was around,” Brooks told Variety of his experiences working with Leachman in the 1970s on “The Mary Tyler Moore Show” and many years later on his much-praised 2004 comedy “Spanglish.”

“She was the only person I ever knew who could make a certain kind of edgy outrageousness be lovable,” Brooks recalled. “You never knew what she was going to do. She was spontaneous. And there was a vulnerability to her. She was intrinsically funny but also brilliant funny.”

Leachman’s versatility was formidable. She became an Oscar winner for “The Last Picture Show” two years into her five-season run on “Mary Tyler Moore.”

She was in her 40s and had the perspective to appreciate the success she achieved as a semi-regular on the groundbreaking CBS sitcom, playing Moore’s flighty, trendy landlady Phyllis Lindstrom. The character was so popular that spinoff “Phyllis” had a two-season run on CBS from 1975-1977.

“She was a very serious artist. She did it for the love [of performing]. It was fun for her,” Brooks recalled. “She loved it when she got it right. She was not somebody to ask [a director] ‘How was I?’ She knew when it was right.”

Off screen, she was “a humanist” who could be loving and jaw-dropping at the same time, Brooks said. He had no trouble remembering her audition for the role of Phyllis. “She was outrageous in the reading. It was not like an audition but somebody taking charge of the room,” he recalled. “It was exciting to be with her because of that.”

Leachman was a perfect fit with the rest of the “Mary Tyler Moore” ensemble, a murderer’s row that included Moore, Ed Asner, Ted Knight, Gavin MacLeod, Valerie Harper, Betty White and Georgia Engel. “Everybody appreciated everybody on that show,” Brooks said. “When things were tough on the set, Cloris would sometimes go sit in Valerie’s lap and hold her like a child.”

Brooks also praised Leachman’s work in “Spanglish,” playing the overbearing mother of a woman (Téa Leoni) insecure in her marriage. He knew the movie was clicking by the sound of Leachman’s laugh on set. “She’d laugh with joy at the ability to be funny,” he said.

Brooks cited the famous quote from Marlon Brando that Leachman was the single-best performer to come out of the famed Group Theatre company of the 1940s. “I understand that to be accurate,” Brooks said.