Supreme Court Justice Ruth Bader Ginsburg takes the stage for a discussion during the Library of Congress National Book Festival at the Walter E. Washington Convention Center on Saturday, August 31, 2019.

Supreme Court Justice Ruth Bader Ginsburg fired back on Wednesday against critics who say the liberal justice should have retired while President Barack Obama was in office.

"When that suggestion is made, I ask the question: Who do you think the president could nominate that could get through the Republican Senate? Who you would prefer on the court than me?" Ginsburg said.

Ginsburg's comments came during an interview with NPR's Nina Totenberg at an event in New York City.

The 86-year-old justice is on the mend after completing a three-week course of radiation treatment in August for a tumor found on her pancreas. In December, Ginsburg underwent surgery for a separate cancer found on her lungs.

Read more: Here's what we know about Ruth Bader Ginsburg's latest cancer scare

Despite those setbacks, Ginsburg has shown no sign of slowing down ahead of the start of the court's next term in October. The former ACLU attorney has maintained an active travel schedule, speaking at events in Chicago, New York, Washington, and Little Rock, Arkansas, with more travel plans slated for the weeks ahead.

Pressed on her agenda, Ginsburg said the busy schedule helps her stay motivated.

"This is my fourth cancer bout, and I found each time that when I am active I am much better than when I am just lying about feeling sorry for myself," Ginsburg said. "The necessity to get up and go is stimulating. And somehow, all these appearances I've had since the end of August, whatever my temporary disability is, it stops, and I'm OK for the event."