By Robert D. McFadden

New York Times News Service

Edith Windsor, the gay-rights activist whose landmark Supreme Court case struck down the Defense of Marriage Act in 2013 and granted same-sex married couples federal recognition for the first time and rights to myriad federal benefits, died Tuesday in New York. She was 88.

Her wife, Judith Kasen-Windsor, confirmed the death 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, 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 was limited to 13 states and the District of Columbia. But in 2015, 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.

Windsor had just wanted a tax refund. But for thousands struggling for gender equality, the stakes went far beyond tax advantages available to married heterosexuals, including Social Security, health care and veterans’ benefits; protection in immigration and bankruptcy cases; and keeping a home after a spouse had died, as well as food stamps, green cards and federal aid to the poor, the elderly and children.

Like countless others, Windsor had been snared by the Defense of Marriage Act of 1996, which barred same-sex married couples from federal recognition as “spouses,” effectively excluding them from federal benefits available to married heterosexuals — precisely 1,138 benefits, according to a count by the Government Accountability Office, Congress’ fiscal watchdog agency.

After living together for 40 years, Windsor and Thea Spyer, a psychologist, were legally married in Canada in 2007. Spyer died in 2009, and Windsor inherited her estate. But the Internal Revenue Service denied her the unlimited spousal exemption from federal estate taxes available to married heterosexuals, and she had to pay taxes of $363,053.

She sued, claiming that the law, by recognizing only marriages between a man and a woman, unconstitutionally singled out same-sex marriage partners for “differential treatment.”

Affirming two lower court rulings, the Supreme Court overturned the law in a 5-4 ruling, citing the Fifth Amendment guarantee that no person shall be “deprived of life, liberty or property without due process of law.”

Gay-rights advocates acknowledged that the ruling had fallen short of their hopes for a constitutional guarantee of nationwide marriage equality. But it was, they said, a crucial step.

President Barack Obama called an elated Windsor with his congratulations. She became a national celebrity, a gay-rights matriarch, a grand marshal of New York City’s LGBT Pride March and a runner-up to Pope Francis for Time magazine’s person of the year in 2013.

Born Edith Schlain in Philadelphia on June 20, 1929, she was the youngest of three children of James and Celia Schlain, Jewish immigrants from Russia who struggled with poverty during the Great Depression. Their candy store and their home above it were quarantined and lost after Edith and a brother contracted polio when she was 2.

Edie, as family and friends called her, read voraciously and was an excellent student in public schools. In high school during World War II, she dated boys but recalled having crushes on girls. In 1946, she enrolled at Temple University. She became engaged to her brother’s friend Saul Windsor, but broke it off when she fell in love with a female classmate.

“It was wonderful and terrible,” she told Time magazine years later. Deciding that she did not want a lesbian life, however, she reconciled with Saul Windsor and married him after receiving her bachelor’s degree from Temple in 1950. Less than a year later, they were divorced.

Windsor kept her sexuality secret from her employer and work colleagues, and was terrified of exposure when she patronized lesbian hangouts. She met Spyer in 1963 at a Greenwich Village restaurant, Portofino, that catered to lesbians on Friday nights. Two years younger than Windsor, Spyer was a clinical psychologist, an accomplished violinist and a daughter of prosperous Dutch refugees.

They danced all night, and they saw each other at parties over the next two years. But it was not until 1965, after meeting again in the Hamptons, that they began dating.

In 1967, Spyer proposed marriage, and they began what became a 40-year engagement, sealed with a diamond brooch — not a ring, which might have raised questions and given them away.

Then, in 1977, their lives changed irrevocably. Spyer learned she had multiple sclerosis, a progressive disease of the central nervous system. As her body slowly deteriorated with paralysis, she used canes, then crutches, then wheelchairs. Caring for her with pulleys, lifts and vans became Windsor’s round-the-clock life.

In 1993, when New York City began a domestic partnership registry to extend housing, health insurance and other benefits to gays, lesbians and unmarried heterosexuals, Windsor and Spyer were among the first to sign up.

And marriage was still their hope in 2002, when Spyer had a heart attack, and in 2007, when doctors said she had only a year to live. With time running out, they traveled to Toronto with six friends and were married in a ceremony conducted by Canada’s first openly gay judge. It was later recognized as a valid marriage by New York state.

“Married is a magic word,” Windsor told a rally outside City Hall in New York a few days before Spyer, a quadriplegic, died on Feb. 5, 2009. “And it is magic throughout the world. It has to do with our dignity as human beings, to be who we are openly.”

Same-sex marriage became valid in New York state in 2011, too late for Windsor and Spyer. But Windsor’s 2013 Supreme Court victory was followed by an avalanche of lawsuits attacking same-sex marriage bans in jurisdictions where they remained. And on June 26, 2015, the Supreme Court made same-sex marriage a constitutional guarantee all over the land.

Kasen-Windsor, a banking executive whom Windsor married on Sept. 26, 2016, is her only survivor. They had met at a gay-rights event and started dating in 2015. They lived in Manhattan and Southampton.