Ruth Bader Ginsburg has said she is on the mend following treatment for pancreatic cancer.

“This audience can see. I am alive,” the US supreme court justice said during an appearance at the Library of Congress national book festival in Washington. “And I’m on my way to being very well.”

Ginsburg, 86, is the oldest member of the court’s liberal wing. The court is divided on a 5-4 conservative majority after Donald Trump appointed two conservatives.

Although Ginsburg has said she wants to remain on the bench as long as she can do the job, liberals and conservatives alike keep a close eye on her health. If she were to leave the bench during Trump’s presidency, the court would most likely be pointed right for decades.

Four thousand people stood in line to see Ginsburg at the book festival, according to the New York Times. According to CNN, the audience responded with “thunderous applause”.

The supreme court announced on 23 August that Ginsburg had finished a three-week course of radiation treatment for a tumor on her pancreas. Doctors said there were no signs the growth had spread.

The procedure came after an operation last December for lung cancer. It was the fourth time that Ginsburg has undergone cancer treatment.

She said she would be prepared for the court session which begins in October. “We have more than a month yet to go,” CNN quoted her as saying. “I will be prepared when the time comes.”

When Ginsburg was asked how she pressed on, she said: “I love my job. It’s the best and the hardest job that I have ever had. It’s kept me going through four cancer battles.

“Instead of concentrating on my aches and pains, I just know that I have to read this set of briefs, go over the draft opinion.”

Ginsburg also said the singer Jennifer Lopez and her fiance, the retired baseball player Alex Rodriguez, recently visited her.

“J-Lo was especially interested in hearing if the justice had a secret to a happy marriage,” CNN said of Ginsburg’s description of the couple’s visit.

Ginsburg has several more public appearances scheduled. There was such high demand for tickets to a scheduled North Little Rock, Arkansas event this Tuesday that it was moved to a sports venue that can hold approximately 18,000, the Times noted.