OMAHA, Nebraska (AP) — A federal judge has blocked Nebraska's gay marriage ban, but the decision will not take effect until March 9.

U.S. District Judge Joseph Bataillon on Monday ordered the western state to not enforce its ban.

Seven same-sex couples filed a lawsuit last year challenging the state's voter-backed ban. Last week, Bataillon heard arguments for and against a motion for an injunction to block enforcement of the ban while the lawsuit is pending.

The Nebraska Attorney General's office has said it will appeal any decision blocking or overturning the ban.

Gay marriage is now legal in 37 of the 50 U.S. states, plus the Washington capital district, following a flurry of judicial rulings.

The U.S. Supreme Court is expected to decide by late June whether same-sex couples have a right to marry nationwide.