Tens of millions of dollars annually will flow from Missouri casinos to state-run nursing homes for military veterans as a result of legislation signed into law Wednesday by Gov. Jay Nixon.

The legislation taps the per-patron fees paid by casinos to provide a permanent, dedicated funding stream for the state's seven nursing homes that serve about 1,300 veterans.

Nixon said he was proud to sign the measure into law, which he highlighted by traveling Wednesday to a veterans' home in Mexico, Mo.

"While we can never fully repay the sacrifices these heroes made for our country, we must uphold our commitment to make sure Missouri veterans receive the quality care they need and deserve," Nixon said.

Missouri's veterans homes have been funded with a mixture of federal and state money and resident payments of $1,800 a month.

But the main veterans trust has shrunk from about $80 million in 1999 to about $17 million after being repeatedly tapped to offset cuts in general revenue appropriations. The fund faced the prospect of being drained entirely by July 2013 without securing a permanent funding source, said Larry Kay, executive director of the Missouri Veterans Commission.

The new Missouri law, which took effect immediately upon Nixon's signature, is expected to generate up to $36.6 million annually for veterans homes — a substantial increase over the $6.6 million veterans homes currently get from the fees.

Early childhood programs that had been funded by the casino fees are instead to get $35 million from Missouri's share of a nationwide settlement with tobacco companies. But the funding switch won't be seamless. The fiscal year 2013 budget recently approved by lawmakers eliminates state funding for some particular early childhood programs that had previously received casino fees.

More cuts are possible.

That's because the budget assumes the Missouri Lottery will generate additional dollars for education, freeing up general revenues to go to other programs that had been funded with tobacco settlement dollars before the funding switch in the veterans' home legislation. It's unclear exactly how the Missouri Lottery will generate the additional money, or whether it can hit the target set by lawmakers.

Senate President Pro Tem Rob Mayer, R-Dexter, acknowledged Wednesday that he has concerns about whether the new funding plan for veterans homes could leave holes elsewhere in the budget.

But Mayer said: "We're hopeful that it will work out."