The maker of Gibson and Les Paul guitars has filed for bankruptcy protection, with the iconic brand known for crafting instruments used by the likes of Elvis Presley, B.B. King and Keith Richards seeking to turn its business around in the face of declining sales.

Long associated with rock and roll, the more than century-old company's products have been embraced by guitar legends including Chuck Berry, whose beloved cherry-red Gibson guitar was affixed to the inside of his coffin lid after his death last year. David Bowie favored the 1989 Gibson L4 when he fronted Tin Machine. Slash swears by them.

But in recent years, the company, which also makes Baldwin pianos, has struggled as guitar sales declined, and an effort at diversifying its business by buying a line of consumer electronics in 2014 proved to be bigger drain on cash than expected.

Get Breaking News Delivered to Your Inbox

A restructuring agreement gives some of the company's lenders an equity ownership, the Nashville, Tennessee-based Gibson Brands said Tuesday.

A Gibson L-5 guitar (C) circa 1929, once owned by Eric Clapton, is shown at Christie's, in New York June 18, 2004. Reuters

"Over the past 12 months, we have made substantial strides through an operational restructuring," Gibson CEO Henry Jusziewiczsaid in statement. Focusing on its core business "we believe will assure the company's long-term stability and financial health," he added.

Juszkiewicz holds a 36 percent stake in the company, which now needs the approval of a federal judge to jettison its debt. An agreement with secured noteholders would help the company repay bank loans as it goes through a "change of control" transaction, the company said in its filing.

With up to an estimated $500 million in debt, lenders have agreed to a loan of up to $135 million to fund its operations. Current noteholders include Silver Point Capital, Melody Capital Partners and funds affiliated with KKR Credit Advisors, according to the court papers.

Gibson, founded in 1894, plans to continue making and selling musical instruments, including Baldwin pianos, and equipment. It sells more than 170,000 guitars a year in more than 80 countries, including more than 40 percent of all electric guitars that cost more than $2,000, according to a bankruptcy filing.

"It is one of the most widely recognized brand names on planet Earth," said George Gruhn of Gruhn Guitars, a world-famous vintage instrument store.

Les Paul guitar known as "Black Beauty." Reuters

The company has already sold off some noncore brands, acquisitions that contributed to its burdensome debt load. Gibson has begun the liquidation process for its debt-plagued, struggling international Gibson Innovations division, which sells headphones, speakers, accessories and other electronics.

Gruhn, an expert on guitars of all kinds, said the company's bankruptcy was predictable after it expanded into the home electronics business. But that doesn't mean the Gibson brand will simply go away, Gruhn added.

"The brand name and company's reputation for making guitars is tarnished, but not dead by any means, and it's very much capable of being resuscitated."

In the hands of musicians from B.B. King to Eric Clapton, Jimmy Page, Duane Allman and Slash, Gibson's electric guitars have been a foundational element of blues and rock. King's signature guitar, "Lucille," was a Gibson.

Legendary jazz guitar player Charlie Christian made history playing a Gibson ES-150 -- one of the first ever electric guitars -- through an amplifier with the Benny Goodman orchestra. The later big-bodied Gibson jazz guitars have been in the arsenal of many great players since then, such as Wes Montgomery and Joe Pass.

Those who fear the death of rock & roll won't be happy to hear that Gibson Guitars has just filed for bankruptcy. pic.twitter.com/IYABxHAuCI — Monsters Of Rock® (@MonstersOfRock) May 1, 2018

One of the only known photographs of iconic Delta blues pioneer Robert Johnson shows him with a Gibson L-1 guitar.

And the folk-revival of the 1950s and 1960s wouldn't have sounded quite so mellow without battalions of steel-string Gibson acoustic guitars among the Martins and Guilds.

Elvis Presley didn't start out with a Gibson but owned and played many of them, according to the website for Graceland, his Memphis home.

Eric Clapton played the solo on the Beatles' "While My Guitar Gently Weeps" on a Gibson guitar he borrowed from George Harrison, according to GuitarWorld.com. And Jimmy Page, the legendary guitarist for blues rockers Led Zeppelin, was and remains a longtime Gibson loyalist.

"It's hard to name any guitar players who play electric or steel-string acoustics who don't own a Gibson," said Gruhn, the Nashville guitar expert.

The Associated Press contributed to this report.