A state senator on Friday questioned Comptroller Peter Franchot’s allegiance to Maryland, citing his appearance in television ads funded by an out-of-state company that is trying to defeat an expanded gambling measure in the Free State.

In a letter, Sen. James E. DeGrange Sr. (D-Anne Arundel) said Penn National Gaming is opposing Question 7 on Maryland’s ballot next week in an effort to protect its economic interests in a casino it owns in Charles Town, W.Va.

“Your actions against the state of Maryland are totally outrageous,” DeGrange, a leading member of the Budget & Taxation Committee, wrote to Franchot on Friday. “We are all aware of your ambitions to be governor, but with your participation in these ads, it is confusing to me in which state — Maryland or West Virginia — that you are campaigning.”

Franchot spokesman Joseph Shapiro said that his boss had yet to see the letter, but added: “It’s not uncommon for temperatures and blood pressures to rise in the waning days of a campaign. The comptroller likes and respects Senator DeGrange, but on this issue, he remains convinced it is a bad deal for Maryland.”

In the ads, a clip of Franchot is shown in which he says: “I’m opposed to Question 7 because I can very clearly tell the people of Maryland there is no new education money coming from this casino.”

Question 7 would allow a new Las Vegas-style casino in Prince George’s County, as well as table games, such as black jack and roulette, at Maryland’s five previously designated slots locations. If a casino opens in Prince George’s, several existing casinos would also get to keep a larger share of slots proceeds to compensate them for the new competition.

Question 7 is on the ballot as a result of legislation passed in August. Nonpartisan legislative analysts have said the state’s expanded gambling plan would eventually net about $200 million a year in additional dollars for education, though not all of that is directly tied to passage of the ballot measure.

Shapiro said Friday that Franchot remains convinced that the ballot measure “will result in not a dime of increased education spending” while it “gives away millions to a wealthy special interest group.”

Under state law, a share of gambling revenue is earmarked for education. But overall state spending on education is set by a formula that is not dependent on fluctuations in gambling proceeds.

In practice, Maryland has used the new revenue from gambling to replace state funds that otherwise would have been spent on education.

Given the tight budgets of recent years, however, DeGrange and others argue that the gambling money has made it easier for the state to fully fund the formula rather than scale back its commitment to education programs.

“We need a competitive gaming program to fund increases in education,” DeGrange said in his letter.