NEW ORLEANS — A federal judge in Mississippi on Monday blocked part of a state law that would have forced the closing of the state’s only abortion clinic.

The ruling is not final, but it did keep the law from going into effect while a decision on its constitutionality is made, keeping Mississippi, at least temporarily, from becoming the first state in the country without an abortion clinic.

The law, passed in the spring of 2012, requires doctors at abortion clinics to have admitting privileges at local hospitals. Lawmakers said at the time that the requirement was intended to protect the health of women, though the governor and several legislators did not disguise their hopes that it would lead to the closing of the state’s lone clinic, the Jackson Women’s Health Organization.

(A similar law was recently passed in Alabama.)

Neither of the two physicians who perform the most abortions at the Jackson clinic has local admitting privileges. The clinic sued, arguing in federal court last summer that the law was a thinly veiled attempt to rid the state of abortion, and thus was unconstitutional.