Mr. Schaefer, who was 87 when he died Dec. 8 at his home in Fort Lauderdale, Fla., worked with musical greats as a young man. He performed in nightclubs alongside Duke Ellington, who once introduced Mr. Schaefer by saying, “And now you’re going to hear a real piano player.” In his teens, Mr. Schaefer held the piano chair in groups led by trumpeter Harry James, saxophonist Benny Carter and progressive bandleader Boyd Raeburn.
In Hollywood, he received an assignment to help Monroe and co-star Jane Russell prepare for their roles in “Gentlemen Prefer Blondes,” a 1953 musical comedy directed by Howard Hawks.
Having worked with Peggy Lee, Billy Eckstine and other singers, Mr. Schaefer coached Monroe as if she were an aspiring jazz or cabaret vocalist. He asked her to listen to recordings by Ella Fitzgerald, then led her through private rehearsals at a bungalow on the studio lot.
Working closely with choreographer Jack Cole, Mr. Schaefer arranged the music for Monroe’s four-minute production number “Diamonds Are a Girl’s Best Friend.” It became the show-stopping centerpiece of “Gentlemen Prefer Blondes” and helped secure Monroe’s reputation as a mesmerizing screen goddess.
Meanwhile, Mr. Schaefer kept busy in Hollywood, tutoring Judy Garland, Mitzi Gaynor and others. He worked again with Monroe on the 1954 film “There’s No Business Like Show Business,” arranging her sensuous number “Heat Wave.” (Mr. Schaefer occasionally appeared on screen in uncredited roles, including in the 1954 western “River of No Return,” in which he was a saloon pianist in a scene in which Monroe strums a guitar and sings a haunting tune, “One Silver Dollar.”)
In January 1954, Monroe married baseball star DiMaggio, but the marriage was a success only in the Hollywood publicity mills. Mr. Schaefer said Monroe confided to him and others that DiMaggio had beaten her.
“He did physically abuse her, and that’s what enraged me so much that I was willing to go and confront him, because I truly loved her,” Mr. Schaefer said in a 2001 documentary, “The Many Loves of Marilyn Monroe.”
“I was on my way to confront him,” he added, “but she said he would make dog meat out of me, so she stopped me from going.”
On Oct. 27, 1954, nine months after they were married, Monroe and DiMaggio divorced. The next week, on Nov. 5, she and Mr. Schaefer had a rendezvous at the West Hollywood apartment of one of Monroe’s friends. DiMaggio was dining that night with Sinatra when they got word of the liaison.
In the documentary, Mr. Schaefer said he and Monroe “were very close to making love” when Monroe had a suspicion of danger.
“We went over to the window, and we saw this group standing across the street,” Mr. Schaefer recalled. “One of them was Joe DiMaggio, and another was Frank Sinatra. They all came en masse and broke this door in, demolished it. It sounded like an explosion.”
But the door they smashed in belonged to the neighboring apartment. A 39-year-old secretary was asleep in bed and screamed at the intruders.
“We scrambled to get out the back way,” Mr. Schaefer later said, “and we made it, luckily.”
The episode did not become common knowledge until the next year, when a Los Angeles gossip magazine disclosed some of the details of what became known as the “Wrong Door Raid.”
As Mr. Schaefer began to gain renown as a jazz pianist with several well-received albums, the effects of the scandal soon overtook his career. Warned that henchmen associated with DiMaggio and Sinatra were planning to break his hands, Mr. Schaefer fled Hollywood in the late 1950s and moved to New York.
He never saw Monroe again.
Harold Herman Schaefer was born July 22, 1925, in Queens. He began to pick out tunes on the piano by ear when he was 4 and studied classical music for several years until he heard a record by jazz pianist Art Tatum, whose rapid-fire brilliance he sought to emulate.
After his Hollywood years, Mr. Schaefer settled in New York and became a record-company executive, responsible for signing and developing performers for the United Artists label. He also wrote and arranged music for Broadway productions, including “A Funny Thing Happened on the Way to the Forum” (1962).
All the while, he continued to teach singing. One of Mr. Schaefer’s prize pupils in New York was a teenage Barbra Streisand. He also worked with stage stars Chita Rivera, Rita Moreno and Julie Wilson.
Mr. Schaefer spoke privately about his association with Monroe, but he did not go public with his account until after DiMaggio’s death in 1999 in Hollywood, Fla. – 10 miles from Mr. Schaefer’s home.
After battling prostate cancer for years, Mr. Schaefer died Dec. 8 of congestive heart failure, a friend, Laura Parker, confirmed.
Survivors include a brother and a grandson. His first marriage, to Leah Cahan, ended in divorce. Their daughter, Katherine Charap, died in June. In 1974, Mr. Schaefer married Brenda Goodman. She died in 2000.
After her death, Mr. Schaefer had her life dates tattooed on the inside of his left forearm: June 1, 1937-April 7, 2000.
In 2001, Mr. Schaefer dedicated an album, “A Date to Remember,” to the two great loves of his life, Monroe and his late wife, Brenda. The women shared the same birthday.