BOSTON (AP) — Hours before a judge heard a contentious lawsuit, the Massachusetts gubernatorial candidates were essentially put on trial Wednesday as a debate moderator asked them a searing series of questions about alleged backroom dealings in the campaign.

Republican Charles Baker, independent Timothy Cahill, Democratic Gov. Deval Patrick and Green-Rainbow Party candidate Jill Stein were called to account before 500 business and community leaders in the aftermath of a dizzying spate of developments recently that have overshadowed any focus on more pedestrian issues such as job growth and tax policy.

Baker was asked directly about the crux of a lawsuit filed by Cahill and being heard Wednesday afternoon in Norfolk Superior Court: that his campaign staff allegedly conspired with former Cahill aides to engineer the defection of the independent's former running mate, Paul Loscocco.

Baker noted that numerous media organizations have looked at the charge and found no evidence to support it, saying he and his aides got involved only when Loscocco called him and announced he wanted to quit the Cahill campaign and endorse Baker's.

"Paul is one of many people who've said, 'Look, I don't want four more years of what I've got,'" Baker told members of the Greater Boston Chamber of Commerce.

Patrick, meanwhile, denied his administration had been offering jobs to Cahill staffers in exchange for keeping Cahill in the race until Election Day, as a way to split the fiscal conservative vote.

"Proving a negative is difficult, and responding to this question, at this time, when folks are worried about their work, their school and their health care, seems to me a profound distraction and a disservice to us all," the governor said.

Moderator Bob Oakes, host of WBUR-FM's morning program, bluntly asked Cahill why he was remaining in the race when polls show him lagging and his chances of winning no greater than "a snowcone has of surviving 15 minutes on Revere Beach in July."

Cahill replied: "I'm in this fight to win, and I'm in this fight to show people that we need a fighter on Beacon Hill. I don't know any relation to snowcones, but this candidate is not melting before Nov. 2."

Stein has largely avoided the fray, except to initially issue a statement declaring the back-and-forth showed she — and not Cahill — was the true independent in the race. Yet she also later said she supported Cahill's efforts to remain in the race.

She said she backed Cahill only insofar as she wanted him to remain a candidate because she did not want the major parties dictating the shape of the field.

"I think the main point here is it's not good for the voters and not good for the commonwealth," Stein said.

Oakes opened the debate with a mild-mannered query, asking the candidates about the business leader who had been the most influential on them.

Cahill cited Quincy restaurateur Howard Johnson, saying he taught him, "You never give up on an idea if you believe in it."

Baker celebrated Harlem educator Geoffrey Canada, crediting him with doing more than anyone else to change the quality of public education in New York City.

Patrick highlighted the head of the first black-owned bank in his hometown of Chicago. Noting "my grandfather swept the floor of that bank for 50 years," Patrick said the institution was the first to practice the concept of microlending.