In the weeks right before her death, Justice Ruth Bader Ginsburg was still conferring on cases, penning notes to friends and continuing to schedule social events, including a wedding that she was to officiate the day she died.

Ginsburg, who had been fighting complications from metastatic cancer of the pancreas, was taken to Johns Hopkins Hospital in Baltimore a week earlier, stayed for a few days, and returned home on September 11, according to two people familiar with the situation. Her medical condition during that time is not known, and the Supreme Court public information officer said on Thursday that the family did not wish to provide details of Ginsburg's final days.

The 87-year-old justice's situation turned severe the week of September 14, and she died the evening of September 18, surrounded by her family.

Until the sudden end, the woman who had become known as the "Notorious RBG" was living as if there would be more tomorrows.

An in-demand wedding officiant

Eric Motley, whose wedding she was to officiate the night of her death, was told two days earlier, without reference to Ginsburg's medical condition, that the wedding would have to be postponed.

"I had been in touch with the chambers, in preparation for Friday," Motley told CNN. "They said we need to push it back, let's look at some other days."

Motley, who wrote about the planned wedding with Ginsburg in an essay for the New York Times, told CNN that he and the justice had exchanged personal emails during the summer and that she had sent him an upbeat note and photograph of the two of them, speaking with a maestro during an opera reception, pre-coronavirus. Ginsburg and Motley, who came to Washington as a special assistant to U.S. President George W. Bush, first met in 2002 at a dinner party and realized they shared a love of music.

Ginsburg had planned to marry Motley and his fiancée in a quiet ceremony on a patio at her apartment. She had officiated at a similar outdoor ceremony last month, after which the newlyweds posted a photo on Twitter. Ginsburg, clad in her black judicial robe and one of her distinctive decorative collars, was sitting at a lectern between them.

Motley, executive vice president of the Aspen Institute, said of Ginsburg's spirits in recent communications: "They were always good, always strong. This was a woman who was made to live. And she will live on."

'Looking forward to brighter days'

Ginsburg's two grown children, Jane and James, and grandchildren were staying intermittently with the justice, who was battling a recurrence of the pancreatic cancer first diagnosed in 2009. She had been undergoing bi-weekly chemotherapy since May. She had revealed the latest round of treatment in July, saying that it was yielding "positive results." A few days earlier that same July week, Ginsburg had been treated at Johns Hopkins Hospital after experiencing fever and chills. She underwent an endoscopic procedure to clean out a bile duct stent that was placed a year earlier, court officials said. In May, just before she began the new chemotherapy, she was hospitalized for a separate condition and participated in the Supreme Court telephonic case arguments from her hospital room.

David Post, a former law clerk to Ginsburg, received a note from her after she watched an August livestreamed performance by his son Sam, a pianist-composer in Washington, including an original composition for the justice.

Post, who was an honorary pallbearer at Wednesday's memorial ceremony, said Sam had taken "a Mozart melody she would know, the aria 'Voi che sapete' from Marriage of Figaro" and written a series of variations on the theme.

"As I'm sure you know," Post wrote to Ginsburg in an email shared with CNN, "this has been a dark and depressing time for many people, not the least of whom are all the musicians, singers, actors, dancers, etc. etc. who have been deprived not only of their livelihoods but their ability to communicate with their audiences and make their wonderful art; I know Sam feels this pretty deeply, and these online concerts, though hardly a substitute for the real thing, at least give him and others a small outlet for their work."

Ginsburg responded, according to a note Post shared, "A good show indeed. Jane and I enjoyed watching. Of course, I delighted in Sam's rendition of 'Voi che sapete.' Looking forward to brighter days when this eerie time ends."

A sudden turn for the worst

Ginsburg participated in Supreme Court cases through at least September 11, when the justices issued a list of orders in pending matters. A colleague who spoke to her around this time detected nothing different in her voice.

Yet, none of the nine justices were seeing each other. They have been largely in isolation since March when the coronavirus pandemic seized the country. They held oral arguments and met for their private sessions by teleconference, as they will do when the new court session begins in early October.

They were aware that Ginsburg was enduring infections and complications associated with the recurring cancer. As Chief Justice John Roberts said in his remarks on Wednesday in the court's Great Hall, she had "emerged victorious time and again against all odds."

Her colleagues and former law clerks were surprised by the sudden turn for the worst.

Ginsburg's granddaughter, Clara Spera, was among the family members at the justice's side during her last days. Spera, who as a small child watched Ginsburg's 1993 Senate confirmation hearing and is now a lawyer, took down a statement the justice dictated declaring that she wanted the next president to name her successor.

That statement was passed onto NPR's Nina Totenberg, a close family friend, who made it public.

U.S. President Donald Trump has since said he doubted Ginsburg dictated such a statement, and he baselessly attributed it to Democratic politicians, such as Senate Minority Leader Chuck Schumer.

Questioned about Spera's statement on Tuesday by CNN's Anderson Cooper, Totenberg said, "I've checked and verified it." She said Spera was "sitting there with her laptop open" and others in the room attested to the episode.

Totenberg said the opening phrasing was classic Ginsburg: "My most fervent wish is that I will not be replaced until a new president is installed."