Legendary American pop composer, songwriter and pianist Burt Bacharach, whose prolific output provided a chart-topping playlist for the 1960s and 1970s with hits like “I Say a Little Prayer,” has died in Los Angeles at the age of 94.

Bacharach worked with a constellation of stars during his decades-long career, from Dionne Warwick and Aretha Franklin to Dusty Springfield and Tom Jones. He toured with Marlene Dietrich and collaborated with the White Stripes.

Bacharach — who died Wednesday of natural causes at his home, his publicist Tina Brausman told AFP — was known for romantic, melancholic ballads that blurred the line between jazz and pop.

He earned a flurry of accolades: three Oscars including for the score of “Butch Cassidy and the Sundance Kid,” an Emmy, eight Grammy awards including a lifetime achievement prize and two Golden Globes.

The list of hits is long: “Walk On By,” “Do You Know the Way to San Jose,” and “Raindrops Keep Fallin’ On My Head” are a few of the best known. He penned nearly 50 Top 100 hits and nine number ones.

Bacharach enjoyed a long and fruitful partnership with Dionne Warwick, including on the 1985 power collaboration “That’s What Friends Are For,” a cover of a song first co-written in 1982 with Carole Bayer Sager, who was one of his four wives.

“Keep smilin’, keep shinin’ // Knowing you can always count on me for sure // That’s what friends are for,” said the lyrics, which brought Warwick together with Elton John, Stevie Wonder and Gladys Knight for an AIDS fundraiser.

“Burt’s transition is like losing a family member,” Warwick tweeted.

“We laughed a lot and had our run-ins, but always found a way to let each other know our family, like roots, were the most important part of our relationship.”

Tributes poured in from everyone from KISS frontman Paul Stanley to Beach Boys co-founder Brian Wilson, offering condolences and praise for Bacharach’s signature optimism and effortless orchestration.

“A titan of beautiful and effortless song,” Smashing Pumpkins frontman Billy Corgan wrote on Twitter.

Arranger, singer, writer

A pianist passionate about jazz, Bacharach was born on May 12, 1928 in Kansas City, Missouri, but moved to New York in his early years. As a teenager, he snuck into clubs to hear the likes of Dizzy Gillespie and Charlie Parker.

He studied music at several American universities, before serving in the US Army in the post-World War II era.

He soon embarked on tour, and was eventually hired by Dietrich as an arranger and musical director.

In 1957, he met lyricist Hal David with whom he would form one of the most successful partnerships in music history.

A few years later at a recording session with the Drifters, they would discover a young backup singer who would become their standard bearer: Warwick.

Between 1962 and 1968, they wrote 20 titles for Warwick that rose into the American Top 40, seven of them Top 10 hits, including “Walk On By” and “I’ll Never Fall in Love Again.”

At that time, the duo also worked with other artists like Springfield (“The Look of Love”), Jones (“What’s New, Pussycat?) and the Carpenters (“Close to You”).

And they also wrote the music for Broadway’s “Promises, Promises,” Neil Simon’s stage adaptation of a Billy Wilder film.

The duo won two Oscars in 1970 for “Butch Cassidy and the Sundance Kid”: best original score, and best original song for “Raindrops Keep Fallin’ on My Head.”

In 1973, a financial dispute broke out between the two men and they never worked together again.

Career resurgence

Bacharach’s later career caught an upswing when he began working with Bayer Sager. He won another Oscar in 1982 for the theme song to the film “Arthur.”

In 1986, Bacharach and Bayer Sager hit number one again with the Patti LaBelle and Michael McDonald duet “On My Own.”

In the 1990s, he worked with Elvis Costello and appeared as himself in the “Austin Powers” films.

Thereafter, he traveled around the world, performing and collaborating with elite orchestras.

“Never be ashamed to write a melody that people remember,” Bacharach once said.

In 2012, he and David earned the Gershwin Prize for Popular Song from the Library of Congress, presented to him by president Barack Obama.

Bacharach sang at the Glastonbury festival in Britain in 2015 at age 87, serenading the crowd with an hour-long set of hits.

The crowd bathed “in the romantic, rose-tinted glow of the easy listening king,” reported the Guardian, adding that pop queen Adele was among those watching.

Bacharach is survived by his fourth wife Jane and three children. A fourth child, Nikki, predeceased him.

“RIP Maestro. It was a pleasure to have known you,” Oasis singer Noel Gallagher wrote on Instagram.