WASHINGTON – Supreme Court Associate Justice Ruth Bader Ginsburg died Friday evening, giving President Donald Trump and Senate Republicans a rare opportunity to solidify conservative control of the court, perhaps for decades to come.

Ginsburg, 87, and in failing health, had overcome four bouts with pancreatic, lung and colon cancer dating back to 1999 but apparently could not beat the most recent spread to her liver. She had announced her latest recurrence in July, again vowing to stay on the court "as long as I can do the job full steam."

The diminutive New York native leaves behind an enormous influence on the law as the nation’s preeminent litigator for women’s rights, a federal appeals court judge, a Supreme Court justice for 27 years and, most recently, as the leader of the high court’s liberal bloc, where she served as a bulwark against an increasingly conservative majority.

"Our nation mourns the loss of a titan of the law," Trump said in a statement. "Renowned for her brilliant mind and her powerful dissents at the Supreme Court, Justice Ginsburg demonstrated that one can disagree without being disagreeable toward one’s colleagues or different points of view."

“Our nation has lost a jurist of historic stature. We at the Supreme Court have lost a cherished colleague," Chief Justice John Roberts said. "Today we mourn, but with confidence that future generations will remember Ruth Bader Ginsburg as we knew her – a tireless and resolute champion of justice.”

Remembering RBG: Second woman on Supreme Court had been nation's leading litigator for women's rights

Ginsburg's death comes just weeks before Democrats hope to win the White House and potentially a Senate majority, given Democratic nominee Majority Leader Mitch McConnell, R-Ky., immediately vowed to hold a Senate confirmation vote. But it generally takes more than two months to reach that point, which would put Republicans beyond Election Day, when their 53-47 majority is in jeopardy.

If the vote was to happen during the "lame duck" session in November or December, the chances for confirmation likely would depend on whether Trump wins reelection and Republicans maintain their Senate majority. They could plow ahead in defeat up until Jan. 3, but if four Senate Republicans desert the cause, they would fall short.

National Public Radio reported that Ginsburg dictated a statement to her granddaughter shortly before her death, in which she said: "My most fervent wish is that I will not be replaced until a new president is installed."

Democratic presidential nominee Joe Biden agreed. "There is no doubt ... that the voters should pick the president, and the president should pick the justice for the Senate to consider," he said. "This was the position the Republican Senate took in 2016 when there were almost 10 months to go before the election."

'We'd fill it': The reverse was evident in 2016 when Associate Justice Antonin Scalia's death prompted Republicans to block Obama from filling the seat.

Roberts Court: Associate Justice Neil Gorsuch early in 2017. That was nothing compared to the outrage that accompanied Associate Justice Brett Kavanaugh's 50-48 confirmation late in 2018, which followed accusations of decades-old sexual assault that Kavanaugh denied.

Amy Coney Barrett, 48, of Indiana, who he nominated to the U.S. Court of Appeals for the 7th Circuit, and Amul Thapar, 51, of Kentucky, a favorite of McConnell's who Trump named to the U.S. Court of Appeals for the 6th Circuit.