Edith Windsor, the gay-rights activist whose landmark case led the Supreme Court to grant same-sex married couples federal recognition for the first time and rights to a host of federal benefits that until then only married heterosexuals had enjoyed, died on Tuesday in Manhattan. She was 88.

Her wife, Judith Kasen-Windsor, confirmed the death, at a hospital, but did not specify a cause. They were married in 2016.

Four decades after the Stonewall Inn uprising fueled the fight for lesbian, gay, bisexual and transgender rights in America, Ms. Windsor, the widow of a woman with whom she had lived much of her life, became the lead plaintiff in what is widely regarded as the second most important Supreme Court ruling in the national battle over same-sex marriage rights.

The Windsor decision, handed down in 2013, was limited to 13 states and the District of Columbia. But in a more expansive ruling in 2015, in Obergefell v. Hodges and three related cases, the Supreme Court held that same-sex couples had a constitutional right to marry anywhere in the nation, with all the protections and privileges of heterosexual couples. Its historic significance was likened to that of Lawrence v. Texas in 2003, which decriminalized gay sex in the United States.