Nearly 20 Democratic senators and 80 members of the House of Representatives signed sharply worded letters that were sent to Secretary of State Mike Pompeo on Thursday, calling on his department to reverse a policy that has been used to deny citizenship to children of Americans born abroad through assisted reproductive technology.

The two letters, which criticized the State Department’s position as “cruel,” “offensive” and “deeply disturbing,” are the latest escalation in tensions over a longstanding citizenship policy that has recently come under scrutiny for its effect on same-sex couples.

Under State Department policy, children born abroad must have a biological connection to an American parent to receive citizenship at birth. That is not a problem when couples have babies the traditional way, but can prove tricky when couples — particularly gay and lesbian couples — have children through techniques like surrogacy and in vitro fertilization, if only one spouse is the genetic parent.

Because the department focuses on biological parentage, certain assisted reproductive technology cases are treated as “out of wedlock,” even if the child’s legal parents are married. That designation triggers a higher threshold for transmitting citizenship, which can include additional residency requirements for the parents that might not apply if the child had been born without reproductive help.

In several examples, the children of same-sex couples have had their citizenship denied or called into question, even though one or both parents are American. The State Department is fighting lawsuits from two of the couples, who argue that the policy discriminates against same-sex couples and their children by failing to recognize their legal marriages.

“Even in the face of the mounting hardship the policy has created for loving families, your Department has gone to great lengths to continue to defend a policy in federal court that separates American families before they reach the U.S. border edge,” the senators said in their letter to Mr. Pompeo, which was reported by The Daily Beast.

“This appears to be a thinly veiled attack on L.G.B.T.Q. Americans,” the letter added.

The effort, which coincided with the celebration of Pride Month in June, was led by Senators Jeff Merkley of Oregon and Kamala Harris of California as well as Representatives Deb Haaland of New Mexico, David Cicilline of Rhode Island and Tom Malinowski of New Jersey.

Ms. Harris was one of seven candidates for the 2020 Democratic nomination who signed the letter. The others were Senators Cory Booker of New Jersey, Amy Klobuchar of Minnesota and Bernie Sanders of Vermont; and Representatives Seth Moulton of Massachusetts, Tim Ryan of Ohio and Eric Swalwell of California.

“We urge you to promptly change your policy so that no more families endure its discriminatory effects,” the House Democrats said in their letter to Mr. Pompeo, a former Tea Party Republican congressman who has expressed opposition to same-sex marriage, but promised to defend gay rights around the world in his role as secretary of state.

The State Department, which has emphasized that the policy applies to opposite-sex and same-sex couples alike, declined to comment Thursday on the requirement or the communication from Congress.

A spokesman for the department referred to Mr. Pompeo’s confirmation testimony, in which he said he deeply believed in the human rights of gay, bisexual and transgender people.

“We have many countries in the world that don’t honor that,” Mr. Pompeo said, adding: “We have a responsibility when we’re dealing with those countries to do our best to have an impact, to make them recognize the fundamental dignity of every human being in the same way that we do here in the United States.”

The policy was first developed in the 1990s and is based on an interpretation of 1950s immigration law, which includes language that children are “born” of their parents and mentions a “blood relationship” in certain cases.

That interpretation has led the State Department to regard births from assisted reproductive technology as “out of wedlock” if the people providing the sperm and the egg aren’t married to each other.

Under the Obama administration, the State Department adjusted the requirement so that a parent could also establish a biological connection not only by supplying the egg or sperm, but also by giving birth. That allows a lesbian couple to have a child “in wedlock” if one woman provides the egg and the other carries the baby. But two men in a marriage don’t have that option.

“We find this to be deeply offensive,” the House Democrats said of the “out of wedlock” designation for children of same-sex couples.

While the policy predates President Trump’s election, the president’s critics have argued that the department’s efforts to preserve it are representative of other administration policies that have sought to dismantle protections for gay, bisexual and transgender people.

Under the Trump administration, the Defense Department established a new policy for transgender troops that requires recruits to use the uniforms, pronouns and facilities for their biological sex. Last year, the Department of Health and Human Services circulated a memo across departments that sought to narrowly define gender as a biological, immutable condition determined by one’s genitalia at birth. In their letter, the Democratic senators also criticized the State Department for banning family visas for same-sex domestic partners of foreign diplomats or employees of international organizations who work in the United States.

This month, Mr. Trump nodded to Pride Month for the first time since taking office, when he announced that his administration had begun a global campaign to decriminalize homosexuality, a move that was criticized by activists who pointed to the administration’s record on gay, bisexual and transgender issues at home.

“Let us also stand in solidarity with the many L.G.B.T. people who live in dozens of countries worldwide that punish, imprison or even execute individuals on the basis of their sexual orientation,” Mr. Trump said on Twitter.

In their letter to Mr. Pompeo, the senators highlighted the case of the Dvash-Banks family, a married Israeli-American gay couple who had twin sons in Canada using sperm from each of the fathers. The biological son of the American received citizenship, but his brother, the biological son of the Israeli, did not.

In February, a federal judge sided with the couple, calling the State Department’s interpretation of the immigration law “strained.” The department is appealing the decision.

The lawmakers called on the State Department to drop its appeal and “make it clear that every U.S. married couple is entitled to the same rights under the U.S. Constitution, no matter whom they love.”