Mississippi lawmakers sent to the governor a bill to keep Medicaid operating for the rest of the fiscal year.
The action just before midnight Monday ended a two-day unprecedented special session to solve the program's $268 million deficit.
The House and Senate approved a House plan to take $240 million from the health care trust fund and repay the money with 5 percent interest over a seven-year period.
Meanwhile, a federal judge has extended a court order that's keeping Medicaid coverage in place for 50,000 poor, elderly and disabled people.
U.S. District Judge Henry Wingate agreed to extend his court order until Mar. 31, or until the House and Senate agree to a compromise plan -- whichever comes first.
Mississippi lawmakers are trying to resolve the program's long-term financial problems.
House and Senate negotiators are still working on a separate plan to reduce Medicaid's long-term expenses by trimming some optional services. They're talking, for example, about reducing the number of prescriptions Medicaid recipients can have filled each month.