The Social Security Administration is looking at possible ways to give benefits to surviving same-sex spouses based on where the marriage was performed, but the agency may be hamstrung by the law, Social Security Acting Commissioner, Carolyn Colvin said Friday.

She noted on its face, the federal law requires the agency to approve survivor benefits based on where the spouse resides.

But Colvin said her staff is working with the Justice Department to develop a rule that is “liberal but sensible.” One of the difficulties will be to write a rule that avoids potential court challenges.

On another issue, Colvin said Social Security field offices are not going away, but their numbers are going to decline because of the need for savings and the greater use of the agency’s Web site by the public.

For the last several years, SSA has had roughly 1,300 locations around the country.

She noted the number of workers and beneficiaries going to the Internet to answer questions climbed 46 percent during the federal government shutdown.

The Social Security head said she has seen lines of people going around the block at branch offices, but fewer people have been complaining to Congress for more money for more offices.

“People are gradually accepting a lower level of service,” she said.

Colvin spoke at the Women’s Institute for a Secure Retirement’s annual symposium in Washington, D.C.