The Department of Homeland Security has stated in writing that foreigners who are same-sex partners of American citizens can be included under an Obama administration policy suspending deportations of some immigrants who pose no security risk.

In letters sent late Wednesday to several Democratic lawmakers, Homeland Security Secretary Janet Napolitano said she was clarifying guidelines that enforcement officers had used when applying a policy of prosecutorial discretion in cases of illegal immigrants with no criminal convictions.

Under the guidelines, which were first issued in June 2011, officers can consider “ties and contributions to the community, including family relationships” when deciding whether to halt a deportation.

Ms. Napolitano wrote that she had ordered her department to issue written instructions specifying that those “family relationships” include “long-term same-sex partners.”

Gay rights groups hailed the letter as a small change with large implications for foreigners in same-sex relationships who were facing deportation.

“This is the first time the government has recognized in writing that the relationship between a gay American and a gay immigrant is a real and positive factor in an immigration case,” said Rachel B. Tiven, the executive director of Immigration Equality, a group that supports gay immigrants’ causes.

Homeland Security officials have long said that gay partners will be considered family members under the prosecutorial discretion policy. Under that policy, Obama administration officials say they are focusing enforcement resources on deporting convicts and foreigners who pose threats to national security.

“This written guidance will simply reiterate existing policy,” said Peter Boogaard, a spokesman for the Department of Homeland Security.

But Ms. Tiven said the policy had remained ambiguous, and gay organizations and Democratic lawmakers had been pressing Ms. Napolitano since last year to put something in writing.

In a letter to the secretary on July 31, more than 80 Democrats from the House of Representatives wrote, “It would be beyond senseless to see L.G.B.T. persons with family ties here in the United States deported” because immigration officers were unaware of the policy on gay families. Signers included the minority leader, Nancy Pelosi, and Michael B. Honda, both of California. Mr. Honda was one of the lead organizers of the effort.