Earlier this week, legendary Pink Floyd guitarist and songwriter David Gilmour auctioned off dozens of his guitars – and he sold them all so he could donate the proceeds to charity.

In total, Gilmour auctioned off 126 of his guitars at Christie’s, raking in a whopping total of $21 million.

The most notable guitar to hit the auctioneer’s block was the iconic black Stratocaster that Gilmour used to record “Comfortably Numb,” “Shine on You Crazy Diamond,” and “Money”, according to Guitar World.

The axe ended up fetching a hefty $4 million after it was purchased by the owner of the Indianapolis Colts.

RELATED: Pink Floyd’s Roger Waters Uses Private Jet to Reunite Mom With Sons Who Were Abducted to Syria

The English rock star says that he will be donating every penny of the auction’s sales to environmental nonprofit ClientEarth.

“The global climate crisis is the greatest challenge that humanity will ever face, and we are within a few years of the effects of global warming being irreversible,” tweeted Gilmour.

“We need a civilized world that goes on for all our grandchildren and beyond in which these guitars can be played and songs can be sung.”

James Thornton, ClientEarth CEO, said: “I’d like to express my deep and heartfelt gratitude to David Gilmour for this utterly remarkable gift. David has a long history of supporting charities and I am honored that he has chosen ClientEarth to benefit from this landmark auction.”

(WATCH Gilmour’s video announcement below)

I am pleased to announce that all the proceeds from the #GilmourGuitars Sale at @ChristiesInc in New York tomorrow will be donated to the charity @ClientEarth. (1/5) pic.twitter.com/uFJ1CvA6QK — David Gilmour (@_DavidGilmour) June 19, 2019

Shine On You Crazy Diamond: Share This Gem Of A Story To Social Media…