The sun came out today for Annie Leibovitz — the legendary photographer has reached a deal to pay back a whopping $24 million loan without losing her life’s work.

In a joint statement Leibovitz issued with her creditor, Art Capital, the two sides said “they have reached an agreement that provides a further restructuring of Ms. Leibovitz’s finances and resolves pending legal matters between them.”

The restructuring of the deal means the acclaimed photographer will retain rights to her portfolio, which includes iconic photos of John Lennon, Demi Moore and Bruce Springsteen, and will not have to sell her three townhouses in Greenwich Village or her sprawling estate in upstate New York.

It also gives her additional time to pay back the loan, although the new deadline was not immediately revealed.

“In these challenging times I am appreciative to Art Capital for all they have done to resolve this matter and for their cooperation and continued support,” Ms. Leibovitz said. “I also want to thank my family, friends, and colleagues for being there for me and look forward to concentrating on my work.”

“We’re gratified to be able to further assist Ms. Leibovitz to achieve financial stability and proud to have been of such value to her at this juncture in her life and career,” said Ian Peck, CEO of Art Capital Group.

Under the terms of the deal, Art Capital will also withdraw a suit it filed against Leibovitz back in July. Leibovitz, meanwhile, has agreed to buy out Art Capital’s interest as exclusive agent for her photo catalogues and real estate agent for her properties, which have been valued in the $40 million range.