The debate over slot machines dominated the fifth day of the special legislative session Friday, as Gov. Martin O’Malley’s top aide faced tough questions from lawmakers following dueling rallies in the shadow of the State House.

 The governor, meanwhile, flanked by Senate President Thomas V. Mike Miller and House Speaker Michael Busch, said he was optimistic his proposal for a referendum on slot machines in the state will pass.

 Slot machines are a key element of the governor’s plan to bridge a $1.7 billion budget shortfall. Even though they would provide little revenue over the next few years, the administration says slots would eventually produce around $700 million a year, about half of which would go toward education.

 O’Malley’s proposal, which would go to referendum next November, would allow for up to 15,000 slot machines at locations in Baltimore City and Allegany, Anne Arundel, Cecil and Worcester counties.

 The bill is based on a slots bill the House passed in 2005 that allowed for 9,500 machines at four locations. But the 2005 bill called for slots in Frederick and Harford counties, while O’Malley’s bill substitutes Baltimore City and Cecil and Worcester counties, moves questioned by lawmakers.

 Delegate Craig Rice, D-Montgomery, asked the governor’s top legislative aide why Frederick County was removed since it is close to Charles Town, W.Va, which has the most slot machines in the region.

 Delegate Page Elmore, R-Somerset, asked the aide, Joseph Bryce, about switching Cecil for Harford, which he said would put two slot parlors on the Eastern Shore.

 Bryce responded that, even without slots in Frederick County, slot machines in Anne Arundel County would be as close to the Washington, D.C., suburbs as Charles Town.

 He also said that, once Baltimore was included in the proposal, it did not make sense to place slots close by in Harford County so the administration moved up Interstate 95 to Cecil County.

 Delegate Ron George, R-Anne Arundel, asked Bryce why slots could not be addressed in January’s regular session, while Sen. Lowell Stoltzfus, R-Somerset, questioned why a constitutional amendment was needed to legalize slots.

 Bryce said that slots had so dominated discussion in the state and was such an important issue that it needed to be resolved quickly.

 He also said slots is a big enough and complicated enough issue that it merits a constitutional amendment. Bryce later told Stoltzfus he “would be happy to work with” Stoltzfus if it meant the senator would vote for the bill.

 Stoltzfus, who like other Republicans has vowed to vote against slots in the special session, responded not to expect that to happen.

 But Miller, speaking after the joint news conference with Busch and O’Malley, said he thought some Republicans would eventually support the referendum.

 At the pro-slots rally, organized by the Maryland Jockey Club, Miller told the crowd he knows what horse racing means to Maryland, noting that George Washington had come to Annapolis to bet on horses.

 Mark Sharp, a horse owner and trainer, said at the rally slots were vital because horse racing “was hanging on by its shirttails,” pointing at increased purses in neighboring states that had approved slots.

 Horse trainer Tim Hooper told lawmakers t