WASHINGTON — The federal government will soon treat married same-sex couples the same as heterosexual couples when they file for bankruptcy, testify in court or visit family in prison.

Attorney General Eric H. Holder Jr. was preparing to issue policies aimed at eliminating the distinction between same-sex and opposite-sex married couples in the federal criminal justice system, according to a speech given at a Saturday event organized by a prominent gay-rights group.

“In every courthouse, in every proceeding and in every place where a member of the Department of Justice stands on behalf of the United States, they will strive to ensure that same-sex marriages receive the same privileges, protections and rights as opposite-sex marriages,” Mr. Holder’s said.

The changes were set in motion last year when the Supreme Court declared it unconstitutional to refuse federal benefits to married same-sex couples, a ruling that Mr. Holder supported.