US supreme court justice Ruth Bader Ginsburg, a towering women’s rights champion who became the court’s second female justice, has died aged 87 at her home in Washington.

A statement from the court said Ms Ginsburg died as a result of complications from metastatic pancreatic cancer.

Her death just over six weeks before US election day is likely to trigger a fierce battle over whether President Donald Trump should nominate her replacement at the highest court in America, or if the seat should remain vacant until the result of the race in November against Democratic challenger Joe Biden is known.

The US senate majority leader Mitch McConnell said senators will vote on Mr Trump’s choice to replace Ms Ginsburg, even though it is an election year.

Mr Trump called Ms Ginsburg an “amazing woman” and did not mention filling her vacant supreme court seat when he spoke to reporters following a rally in Minnesota.

Mr Biden said the winner of the November election should choose Ms Ginsburg’s replacement.

Supreme Court Obit Ginsburg
Ruth Bader Ginsburg takes the court oath from chief justice William Rehnquist, right, as then-president Bill Clinton (left) looks on, after her 1993 appointment (Marcy Nighswander/AP)

“There is no doubt – let me be clear – that the voters should pick the president and the president should pick the justice for the senate to consider,” Mr Biden told reporters in Delaware.

Former president Barack Obama was among those paying tribute to Ms Ginsburg.

He said: “Over a long career on both sides of the bench – as a relentless litigator and an incisive jurist – justice Ginsburg helped us see that discrimination on the basis of sex isn’t about an abstract ideal of equality; that it doesn’t only harm women; that it has real consequences for all of us. It’s about who we are – and who we can be.”

US chief justice John Roberts also mourned Ms Ginsburg’s passing, saying: “Our nation has lost a jurist of historic stature.

“We at the supreme court have lost a cherished colleague. 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.”

Ms Ginsburg announced in July that she was undergoing chemotherapy treatment for lesions on her liver, the latest of several battles with cancer.

She spent her final years on the bench as the unquestioned leader of the court’s liberal wing and became something of a rock star to her admirers.

Young women especially seemed to embrace the court’s Jewish grandmother, affectionately calling her the Notorious RBG, for her defence of the rights of women and minorities, and the strength and resilience she displayed in the face of personal loss and health crises.

Those health issues included five bouts with cancer beginning in 1999, falls that resulted in broken ribs, the insertion of a stent to clear a blocked artery and assorted other hospital treatments after she turned 75.

She resisted calls by liberals to retire during Barack Obama’s presidency at a time when Democrats held the senate and a replacement with similar views could have been confirmed.

Instead, Mr Trump will almost certainly try to push Ms Ginsburg’s successor through the Republican-controlled senate — and move the conservative court even more to the right.

Supreme Court Obit Ginsburg
People lay flowers and light candies outside the Supreme Court late on Friday after the death of Ruth Bader Ginsburg (Alex Brandon/AP)

Ms Ginsburg antagonised Mr Trump during the 2016 presidential campaign in a series of media interviews, including calling him a faker. She later apologised.

Her appointment by then-president Bill Clinton in 1993 was the first by a Democrat in 26 years. She initially found a comfortable ideological home somewhere left of centre on a conservative court dominated by Republican appointments. Her liberal voice grew stronger the longer she served.

Ms Ginsburg was a mother of two, an opera lover and an intellectual who watched arguments behind oversized glasses for many years, though she ditched them for more fashionable frames in her later years. At argument sessions in the ornate courtroom, she was known for digging deep into case records and for being a stickler for following the rules.

She argued six key cases before the court in the 1970s when she was an architect of the women’s rights movement. She won five.

Supreme Court Obit Ginsburg
A message left outside the Supreme Court late on Friday (Alex Brandon/AP)

At the time of her appointment, Mr Clinton said: “Ruth Bader Ginsburg does not need a seat on the supreme court to earn her place in the American history books. She has already done that.”

Following her death, Mr Clinton said: “Her 27 years on the court exceeded even my highest expectations when I appointed her.”

On the court, her most significant majority opinions were the 1996 ruling that ordered the Virginia Military Institute to accept women or give up its state funding, and the 2015 decision that upheld independent commissions some states use to draw congressional districts.

Besides civil rights, Ms Ginsburg took an interest in capital punishment, voting repeatedly to limit its use. During her tenure, the court declared it unconstitutional for states to execute the intellectually disabled and killers younger than 18.

In addition, she questioned the quality of lawyers for poor accused murderers. In the most divisive of cases, including the Bush v Gore decision in 2000, she was often at odds with the court’s more conservative members – initially chief justice William H Rehnquist and justices Sandra Day O’Connor, Antonin Scalia, Anthony M Kennedy and Clarence Thomas.

The division remained the same after John Roberts replaced Rehnquist as chief justice, Samuel Alito took Ms O’Connor’s seat, and, under Mr Trump, Neil Gorsuch and Brett Kavanaugh joined the court, in seats that had been held by Mr Scalia and Mr Kennedy, respectively.

Ms Ginsburg would say later that the 5-4 decision that settled the 2000 presidential election for Republican George W Bush was a “breathtaking episode” at the court.

When Mr Scalia died in 2016, also an election year, senate majority leader Mitch McConnell refused to act on Mr Obama’s nomination of judge Merrick Garland to fill the opening.

The seat remained vacant until after Mr Trump’s surprising victory. Mr McConnell has said he would move to confirm a Trump nominee if a vacancy came up this year.

Ms Ginsburg authored powerful dissents of her own in cases involving abortion, voting rights and pay discrimination against women.

She said some were aimed at swaying the opinions of her fellow judges while others were “an appeal to the intelligence of another day”, in the hopes that they would provide guidance to future courts.

“Hope springs eternal,” she said in 2007, “and when I am writing a dissent, I’m always hoping for that fifth or sixth vote – even though I’m disappointed more often than not.”

She married her husband, Martin Ginsburg, in 1954, the year she graduated from Cornell University. He died in 2010. She is survived by two children, Jane and James, and several grandchildren.