Prince George’s County officials said Tuesday that despite the state’s fiscal crisis, they emerged from the General Assembly with most of what they wanted, including crucial funds for the school system that could avert some layoffs and restore busing for magnet programs.

The county also won $3 million to help keep Rosecroft Raceway in Fort Washington afloat while it emerges from bankruptcy protection. That will help save jobs, said County Executive Rushern L. Baker III (D).

“Coming together, fighting hard, we did what people thought was impossible,” Baker said at a news conference in Annapolis.

The county also won a partial reprieve from a $2.9 million debt to the state for its costs in building roads around FedEx Field in Landover. The county also won $4 million to make improvements to the facilities at Prince George’s Hospital Center, and $15 million to help keep it operating while a long term fix is attempted.

Baker, the County Council and state officials are trying to work out a deal that would bring in the University of Maryland Medical System and the state’s medical school to help operate the hospital, owned by Dimensions Healthcare.

Overall, county officials say they got about $985 million in direct state aid, and won back about $28 million of $30 million in cuts proposed by Gov. Martin O’Malley (D).

The funds will help the county, which is expecting a deficit next year that could top $100 million. And Baker is also facing a request from county unions for 2 percent pay raises, something he has told the council he opposes.

Early in the session, the Prince George’s delegation approved ethics measures that would restrict the council’s ability to delay development proposals and would limit its authority to vote on developments if the council member was part of a slate that received campaign funds from the developer. Those measures were signed into law Tuesday.

This post has been updated since it was first published.