“Nasty Gal” and her two other 1970s albums influenced generations of R&B and hip-hop.Betty Davis, the singer and songwriter whose raunchy persona, fierce funk grooves and Afrofuturistic style in the early 1970s made her a forerunner of R&B and hip-hop to come, died on Wednesday in Homestead, Pa., the town outside Pittsburgh where she had lived. She was 77.Her reissue label, Light in the Attic, distributed a statement from her friend of 65 years, Connie Portis, announcing the death of a “pioneer rock star, singer, songwriter and fashion icon.” The cause was not specified. Ms. Davis, who first recorded as Betty Mabry, got her last name from her one-year marriage to the jazz bandleader Miles Davis. The music she made in the early 1970s didn’t bring her nationwide hits, but it directly presaged the uninhibited funk of musicians from Prince to Janet Jackson to Janelle Monáe.On the three albums she released from 1973 to 1975, Ms. Davis growled, moaned, teased and rasped through songs that were lascivious, bluesy and hardheaded. She posed in lingerie, in neo-Egyptian regalia and in space-warrior garb, with her hair in a towering Afro; she performed in silvery thigh-high boots, short shorts and a bustier. The poet Saul Williams described her as “the burning secret of Black womanhood and sensuality as expressed through song.”In a 2018 interview with The New York Times, Ms. Davis said, “I wrote about love, really, and all the levels of love,” proudly including carnality. “When I was writing about it, nobody was writing about it. But now everybody’s writing about it.”In the 2000s, Light in the Attic reissued Ms. Davis’s albums with her approval.“Nasty Gal” would be her last studio album released near the time it was recorded, and she never had a certified hit. As the 1980s began, she left the music business almost completely. Yet listeners and musicians have repeatedly rediscovered her, and Davis gained ever-increasing respect as her music was sampled — by Ice Cube, Method Man and Lenny Kravitz among others — and reissued. “This lady was hip before hip was hip,” Mr. Kravitz tweeted.She was born Betty Gray Mabry on July 26, 1944, in Durham, N.C., to Henry and Betty Mabry and grew up in rural North Carolina and in Homestead. Her father was a steelworker, her mother a nurse. In the 2017 documentary film “Betty: They Say I’m Different,” she recalled listening as a little girl to the blues and rock ’n’ roll — Big Mama Thornton, Howlin’ Wolf, Elmore James, Chuck Berry — and singing along with the record player. She was 12 when she wrote her first song, “Bake a Cake of Love,” and she sang in local talent shows.As a teenager, Ms. Mabry went o New York City to study at the Fashion Institute of Technology; she brought along a notebook full of songs. She worked as a model for the Wilhelmina agency, appearing in Glamour and Seventeen magazines and as a pinup in Jet magazine. She also worked as a club hostess, and she savored the city’s 1960s nightlife and met figures like Andy Warhol and Jimi Hendrix.Her first single, in 1964, was “The Cellar.” According to Danielle Maggio, an ethnomusicologist and adjunct professor at the University of Pittsburgh who wrote her dissertation on Ms. Davis, the song was named after a private club at Broadway and West 90th Street. Ms. Mabry became its M.C., disc jockey and hostess, and the club drew artists, musicians and athletes.In 1967, the Chambers Brothers recorded one of her songs, “Uptown.” The South African trumpeter Hugh Masekela, then her boyfriend, produced a 1968 single for her, “Live, Love, Learn.”Ms. Davis with her husband, Miles Davis, at their home in New York in 1969. During their yearlong marriage she introduced him to the music of Jimi Hendrix and Sly Stone, catalyzing his move into rock and funk.Baron Wolman/Getty ImagesShe met Miles Davis at a jazz club and became his second wife in 1968. A photograph of her is the cover of Davis’s 1969 album, “Filles de Kilimanjaro,” which includes a tune titled “Mademoiselle Mabry.” Ms. Davis introduced her husband to the music of Jimi Hendrix and Sly Stone, catalyzing his move into rock and funk.While Mr. Davis was working on a later album, he considered calling it “Witches Brew”; his wife suggested “Bitches Brew,” the title that stuck. She also convinced him to trade the dapper suits of his previous career for flashier contemporary fashion. “I filled the trash with his suits,” she recalled in the documentary.Mr. Davis encouraged her to perform. In 1969, he produced sessions for her, choosing musicians including Herbie Hancock and Wayne Shorter from Davis’s quintet and Mitch Mitchell and Billy Cox from Hendrix’s Band of Gypsys. His label, Columbia Records, rejected the results, which remained unreleased until 2016.The marriage was turbulent and sometimes violent before ending in 1969. “Miles was pure energy, sometimes light but also dark,” Ms. Davis recalled in the documentary. “Every day married to him was a day I earned the name Davis.”She kept the name as she returned to songwriting. Material she wrote for the Commodores brought her an offer to record for Motown, but she turned it down because she insisted on keeping her publishing rights.Ms. Davis subsequently moved to London — where a new boyfriend, Eric Clapton, offered to produce an album for her — and then to the Bay Area, where Michael Lang, who had promoted the 1969 Woodstock festival, signed her to his label, Just Sunshine. Greg Errico, the drummer from Sly and the Family Stone, produced her debut album, “Betty Davis”; it opened with “If I’m in Luck I Might Get Picked Up” and included “Anti Love Song,” which warned, “Just as hard as I’d fall for you, boy/Well you know you’d fall for me harder.”Ms. Davis wrote all the songs on her albums, and she produced the next two herself: “They Say I’m Different” and “Nasty Gal,” which brought her to a major label, Island Records. The music and arrangements were hers; she sang each part to her band members. Her songs were aggressive, jaggedly syncopated funk that was anything but shy. In “Nasty Gal,” she boasted, “You said I love you every way but your way/And my way was too dirty for you.”But while Davis conquered club audiences, she found little traction on radio, denying her any commercial success. In 1976, she recorded another album, which included the autobiographical “Stars Starve, You Know.” The song complains, “They said if I wanted to make some money/I’d have to clean up my act.”Island shelved the album, which went unreleased until 2009, and dropped Ms. Davis. “The doors in the industry kept closing,” she said in the film. “All these white men behind desks telling me to change. Change my look, change my sound. ‘Change your music, Betty.’”In 1979, she found independent financing to make another album, “Crashin’ With Passion,” recording it in Los Angeles with musicians including Mr. Hancock, Martha Reeves (of Martha and the Vandellas) and the Pointer Sisters; it, too, went unreleased. Ms. Davis felt that the music business was done with her. In 2018, she said: “When I was told that it was over, I just accepted it. And nobody else was knocking at my door.”The death of her father, in 1980, deepened her isolation and depression. On a yearlong visit to Japan in the early 1980s, she played some club dates with a Japanese band, her last live performances. She left no immediate survivors.But as the decades passed, she was far from forgotten. In the 2000s, Light in the Attic reissued her albums with her approval, along with the Columbia sessions produced by Mr. Davis and her unreleased 1976 album, “Is It Love or Desire.” Hip-hop samples made clear how hard-hitting her productions still sounded, and the 2017 documentary brought new affirmations that Ms. Davis had been ahead of her time.“Being different is everything,” she said in the film. “It is the way forward.” More