Camilla Williams, an acclaimed soprano who in 1946 became the first black woman to appear in a leading role with a major American opera company — in the title role of “Madame Butterfly” — and who sang the national anthem at the 1963 March on Washington, died Jan. 29 at her home in Bloomington, Ind.

She was 92 and had complications from cancer, according to Alain Barker, a spokesman for Indiana University’s Jacobs School of Music, where Ms. Williams taught for two decades before her retirement in 1997.

Ms. Williams, a native of southern Virginia, was considered a matriarch among African American opera singers. During the first half of the 20th century, opera houses had excluded black musicians, either by relegating them to minor roles or refusing to book them at all.

On May 15, 1946, when Ms. Williams appeared on the New York City Opera stage as the tragic Japanese geisha Cio-Cio-San of Puccini’s classic opera — one of the most celebrated roles in the Italian repertoire — classical music had reached a turning point.

“It’s impossible to overstate how important that was for . . . the music scene in New York, for African American singers, and for American singers,” F. Paul Driscoll, the editor-in-chief of Opera News, said in an interview.

Camilla Williams, left, as Cio-Cio-San and Margery Mayer as Suzuki in the 1946 production of “Madame Butterfly” at the New York City Opera. Williams, an African American soprano, became the first black woman to appear in a leading role with a major American opera company. (Courtesy of Fred Fehl/New York City Opera)

Nine years after Ms. Williams’s City Opera debut, contralto Marian Anderson became the first black singer to perform at the Metropolitan Opera. Anderson had drawn national attention in 1939 when, after being turned away from Constitution Hall because of her race, she stood on the steps of the Lincoln Memorial and sang “America” in a concert heard by millions on the radio.

After Ms. Williams came American superstars such as Leontyne Price, a mainstay of the Met during the 1960s and ’70s who is widely considered one of the finest sopranos in history, as well as Shirley Verrett, who was known in Italy as the “Black Callas.”

Ms. Williams’s performance in “Madame Butterfly” was hailed by New York Times music critic Noel Straus as “an instant and pronounced success.” She followed it with a string of appearances with the City Opera in productions including Puccini’s “La Boheme” and Verdi’s “Aida.”

In 1951, Ms. Williams sang the title female role in a Columbia Records recording of “Porgy and Bess,” the folk opera with music by George Gershwin and lyrics by Ira Gershwin and DuBose Heyward.

Those successes helped Ms. Williams launch an international career studded by performances of “Madame Butterfly” in London and at the prestigious Vienna State Opera.

At the March on Washington, when the Rev. Martin Luther King Jr. delivered the “I Have a Dream” speech, Ms. Williams was invited to sing a spiritual. She also sang “The Star-Spangled Banner” when Anderson got stuck in traffic.

“I ran up all the steps of the Lincoln Memorial and was out of breath when I got to the microphone,” she recalled, according to a video tribute made by Richard Glazier, a Gershwin scholar and friend of Ms. Williams’s.

Ms. Williams did not achieve the fame of Anderson or Price, but she lacked certain advantages that they enjoyed. Anderson had the backing of the powerful impresario Sol Hurok (and in the case of the Lincoln Memorial concert, first lady Eleanor Roosevelt). In contrast to Ms. Williams, who had a lighter voice, Price had an instrument that was both beautiful and stunningly powerful, capable of filling even the most cavernous opera house.

Ms. Williams’s most important contribution to opera may have been her courage to appear on the stage of a major American opera house at a time when many people, including some of her colleagues, did not wish to see her there.

Decades after the City Opera debut, she learned that the white singer slated to play Pinkerton, the male lead role in “Butterfly,” had written to former New York City mayor Fiorello La Guardia to protest her presence. The revelation, made decades later, came as a wrenching shock.

“I had resolved years earlier that I had no more such tears left — that I was done crying,” she recalled in an autobiography co-written with Stephanie Shonekan, a music and black studies scholar. “What my parents taught me about being a human being carried me through . . . and kept me sane and grounded even when I felt that the odds were against me.”

Camilla Ella Williams was born Oct. 18, 1919, in Danville, Va., the daughter of a chauffeur and a laundress. She grew up in a family of self-taught musicians and by age 9 was playing the piano, dancing and singing in the local Baptist church choir.

“All my people sang,” she once wrote, according to information provided by Indiana University. “We were poor, but God blessed us with music.”

Ms. Williams took her first formal lessons about age 12 from a Welsh musician who had settled in her Virginia town. Barred from attending the school for white girls, she studied with the teacher in a private home. (One of the songs he assigned her, although she did not learn it at the time, was “Un bel di,” Cio-Cio-San’s signature aria in “Madame Butterfly.”)

She was valedictorian of her high school and graduated in 1941 from what is now Virginia State University, a historically black institution. She received a scholarship to study music in Philadelphia with Marion Szekely Freschl, a voice instructor who also taught Anderson and Verrett. Twice in the 1940s, she won the Marian Anderson Award for young musicians.

One of her most important advocates was the American soprano Geraldine Farrar, who was white, and who heard a young Ms. Williams sing in a recital in Stamford, Conn. Farrar wrote to Ms. Williams’s manager that she was “quite unprepared for this young woman’s obvious high gifts,” an endorsement that helped push forward her career even as racial barriers held her back.

Traveling around the country in the early years of her career, she had to sit in the back of trains and buses while her white accompanists sat in the front. During her rehearsals with the City Opera, she stayed at the YWCA in Harlem.

Ms. Williams was married to Charles Beavers, a civil rights lawyer. He died in 1969 after 19 years of marriage. About a decade ago, she rekindled her friendship with Boris Bazala, her former accompanist, and lived with him until his death last year. She had no survivors.

“I’ve had to endure a lot, go through my ‘Gethsemanes,’ ” Ms. Williams wrote in her autobiography. “But I am not bitter. The thing is how you endure the hard times.”