The battles over ballot measures in Maryland that would legalize same-sex marriage and expand gambling in the state have been inundated with funds from out of state, according to campaign finance reports filed Friday.

The fight over whether to legalize table games and allow what would be the state's sixth casino to open in Prince George's County has quickly become the most expensive political battle in the state's history, with a combined total of $40.8 million raised the two sides. The vast majority of those contributions came from out-of-state stakeholders.

MGM Resorts International, which plans to operate a casino at National Harbor if the measure passes, has given $14.4 million, and Caesars Entertainment, which plans to open a new Baltimore casino, has contributed $3.4 million to the committee supporting the referendum, For Maryland Jobs and Schools, Inc. The Fairfax-based Peterson Companies, which plans to develop the National Harbor casino, has also given $1.25 million in support of the fight.

Source: Maryland State Board of Elections

Committee Issue and Stance Out-of-state money from individuals Out-of-state money from organizations and corporations In-state money Total contributions* Advertising spending
Maryland Marriage Alliance Against same-sex marriage $3,837.50 $654,837.50 $183,783.24 $854,505.86 $473,255
Marylanders for Marriage Equality For same-sex marriage $647,213.12 $943,500 $1,708,106.62 $3,688,506.04 $1,672,142.41
Get the Facts - Vote No On 7 Against casino expansion None $21,610,536 None $21,625,836
For Maryland Jobs & Schools, Inc. For casino expansion $250 $17,953,163 $1,050 $19,133,666.90 $15,908,038.07
*This includes in-kind contributions

Meanwhile on the other side of the issue, Penn National Gaming has contributed all $21.6 million of the Get the Facts -- Vote No On 7 committee's funds.

Together the two committees have spent $32 million to flood Maryland television and radio stations with advertisements.

The spending on the fight over same-sex marriage is an order of magnitude less than that expended on the fight over casinos. However, like the other battle, both sides are being bankrolled by out-of-state contributors.

The opponents of the referendum, operating through the Maryland Marriage Alliance committee, have received nearly 80 percent of their funding from out of state. Of the roughly $854,000 that came from approximately 300 donors, $400,000 came from the National Organization for Marriage and $250,000 from the Knights of Columbus. Only about $184,000 came from supporters in Maryland.

Marylanders for Marriage Equality, the main commitee fighting for the referendum to pass, raised $3.7 million, more than four times what its opponents raised, about 47 percent of which came from out-of-state donors.

The campaign received major out-of-state contributions from several large organizations -- $250,000 from the Service Employees International Union, $250,000 from the Human Rights Campaign and $350,000 from the American Federation of State, County and Municipal Employees, for example. However, 69 percent of the out-of-state donations came from individuals across the country, and even some individuals as far away as Sweden and the United Kingdom. The largest individual donation was the $250,000 New York Mayor Michael Bloomberg gave earlier this month.

Despite the large number of out-of-state contributions, Campaign Manager Josh Levin insisted that the campaign is largely an in-state, grassroots effort. "The reason that we've had such success raising money from people here in Maryland ... is because of the impact it will have on people here in this state."

Representatives of the Maryland Marriage Alliance did not return requests for comment.