WASHINGTON — Karen Capato used the frozen sperm of her deceased husband to conceive twins, but the government denied them Social Security benefits as their father’s survivors. Her situation, more common as reproductive technology advances, had a mostly unsympathetic Supreme Court grappling Monday with the definition of “child,” inheritance law and artificial insemination.

The case had justices trying to shoehorn a 1930s law that gave Social Security survivor benefits to the dependent “child or legally adopted child” of a person into a modern situation where a man can bank his sperm for use months or years later to produce a child he will never see.

“You want us to sort of apply this old law to new technology,” Justice Stephen Breyer said to Charles Rothfeld, the lawyer for Capato, the mother of twins fathered by her deceased husband, Robert. Lawmakers who wrote the survivor benefits law “never had any inkling about the situation that has arisen in this case,” added Justice Samuel Alito.

But Justice Antonin Scalia said that they weren’t trying to delve into new technology. “What is at issue here is not whether children that have been born through artificial insemination get benefits. It’s whether children who are born after the father’s death get benefits,” Scalia said.

The Capato twins were born through using Robert Capato’s frozen sperm 18 months after he died of esophageal cancer. Karen Capato’s application for survivor benefits was rejected by the Social Security Administration, which said that for them to qualify, Robert Capato needed to be alive during conception. A federal judge agreed, saying they had to qualify as Capato’s children before his death or qualify under state law as children who could inherit.

Florida law bars children conceived posthumously from inheritance, unless named in a will.

The only beneficiaries named in Capato’s will are his wife, their son and his two children from a previous marriage.

The 3rd U.S. Circuit Court of Appeals in Philadelphia overturned that decision, saying the Capato twins were clearly the biological children of Robert Capato. But other federal appellate courts have ruled differently in similar cases, leaving the Supreme Court to decide.

Scalia questioned whether the twins could have ever been dependents of Capato’s, another requirement to get survivor benefits, since they were born after his death. The law “disfavors children who are born after the father has died. Which is in accord with the title of the statute: ‘Survivors Benefits,’ ” Scalia said.

But Rothfeld noted that men sometimes do die before their children are born. “There is no question that children who are born, who are conceived naturally in the marriage and are born after the father’s death are deemed to be dependents and receive benefits,” he said.

Some justices noted that ruling for the Caputo twins could cause all types of problems for Social Security benefits.

“What if the Capato twins were born four years after the death in this case?” asked Chief Justice John Roberts. “So what happens if the biological mother remarries or something and then goes through this process?”

Justice Ruth Bader Ginsburg pointed out that adopted children have to be through the adoption process before one of their parents dies to get benefits. “There is a time limit for other children,” Ginsburg said.