Two of the biggest projects in Prince George's County are slated to get

tens of millions in state funding in Maryland Gov. Martin O'Malley's budget.

The first, a new medical center set to open by 2017, would

receive $20 million from the state, with a $15 million operating subsidy. It's the first installment in a planned $200 million package of state aid for the project.

The hospital, projected to cost $600 million, was championed by County Executive Rushern Baker as part of a health care overhaul for the county.

"The governor provided everything we expected on the operating side and the capital side for the hospital," said Thomas Himler, Baker's budget chief.

The money being doled out by Maryland in fiscal 2014

is thanks in part to gambling revenue, which is expected to increase as the number of casinos in the state doubles by 2016. The new hospital in particular had been used as a bargaining chip in the fight over the expansion of gambling.

State Senate President Thomas V. Mike Miller Jr., D-Prince George's and Calvert counties, wanted the fate of the hospital tied to the fate of a casino in Prince George's. Baker, who had previously opposed gambling, came out in favor in early 2012 -- but he maintains the hospital would have gone through no matter what.

Gambling expansion passed as a November ballot measure, allowing for a new casino in the county along with table games and 24-hour operation at existing casinos statewide. The new facility will likely be an $800 million luxury casino at National Harbor, though bidding for it opens Jan. 31.

The other project, set to receive about $21.4 million, is a major reconstruction to the state's Cheltenham Youth Facility. The new $58.8 million detention facility for male juvenile offenders is expected to open in 2015.

Cheltenham has struggled with overcrowding and safety issues in recent years. A 2011 report from the Maryland Juvenile Justice Monitoring Unit called it the most overcrowded state-run youth detention facility in the state.

"Two youths sleep in almost every cell -- one on a plastic boat bed placed on the floor," the report says. "Each youth should have an individual cell."

The facility also saw a 62 percent rise in incidents of aggression or self-harm from 2010 to 2011, according to the report.

"The ultimate plan is to completely shut down the old facility," said Eric Solomon, a spokesman for the Maryland Department of Juvenile Services. "We think we shouldn't have any problems doing that."

O'Malley's budget also includes nearly $16 million in funding for individual public schools in the county along with nearly $26 million for improvements at the University of Maryland, College Park, and $4.5 million for a new natural sciences center at Bowie State University.