The Pennsylvania Legislature on Thursday approved a massive expansion of gambling as part of a $32 billion budget package sent to Gov. Tom Wolf for his signature. The measure does not require new gambling sites to subsidize horse racing and breeding industries in the state. The budget deal, which was passed by the House on Thursday morning after the Senate approved it Wednesday night, is designed to close a $2 billion budget deficit that has been the subject of contentious negotiations. Lobbyists for gambling companies swarmed the capitol in recent months in the hopes of persuading legislators that new casinos could help close the gap, and the legislature’s refusal to consider raising taxes in any significant manner helped clear the path. Under the deal, the operators of Pennsylvania’s 10 largest casinos will have the right to open a second casino in the state, with up to 750 slot machines and 30 table games at each house, provided the location is not within 25 miles of another casino. In addition, licensed casino operators within Pennsylvania and in other states will be allowed to apply for online gambling licenses. The lottery will also be authorized to sell tickets online, as long as it does not offer “casino-style games” in competition with the sites run by casino companies. Unlike existing casinos in Pennsylvania, the new casinos will not be required to contribute a portion of their revenues to the state’s Thoroughbred and harness racing industries. Combined, those two industries receive approximately $250 million a year in breeding and purse subsidies from the existing casinos, an amount that could be threatened if gambling dollars migrate to new locations or the online sites. The budget deal also formally authorizes fantasy-sports sites in the state, with the sites required to pay a $50,000 license fee and a 15 percent tax on revenue from in-state participants. It also states that casinos could apply to offer sports betting if questions over the legality of the practice are cleared up following a U.S. Supreme Court opinion that is expected next spring. Pennsylvania is already the second-largest commercial gambling market in the U.S., after Nevada. The expanded gambling portions of the plan would raise $200 million toward closing the $2 billion budget gap this fiscal year, according to estimates. Instead of raising taxes in any substantial form, the legislature authorized $1.5 billion in debt to close the largest part of the gap, backed by the state’s tobacco settlement. In late September, Standard and Poor’s downgraded Pennsylvania’s credit rating, citing the prolonged impasse over the budget and the state’s use of “one-time revenues” to plug budget holes in the past.