WASHINGTON — The federal government will recognize more than 300 same-sex marriages that were performed in Michigan last weekend, Attorney General Eric H. Holder Jr. said Friday, a day after Michigan’s governor said his state would not.

Mr. Holder’s announcement caps a period of rapid change and uncertainty over the status of same-sex marriage in Michigan. On March 21, a federal judge struck down the state’s ban on same-sex marriage, and the next morning gay and lesbian couples rushed to exchange vows. By late that afternoon, however, an appeals court stayed the judge’s ruling.

While the appeals play out, the legal status of those unions has been uncertain.

Gov. Rick Snyder, a Republican, said Thursday that they were “legal and valid marriages” but that the state would not recognize them until the court resolved the matter.

Mr. Holder said the federal government viewed it differently. “These families will be eligible for all relevant federal benefits on the same terms as other same-sex marriages,” he said in a statement released by the Justice Department.