Associated Press photoFormer Massachusetts House Speaker Salvatore DiMasi, right, walks with his wife Deborah and other family members after leaving the Federal courthouse in Boston, Wednesday after his conviction on conspiracy and other charges in a scheme to steer two state contracts worth $17.5 million to a software firm in exchange for payments.

BOSTON – U.S. District Court Judge Mark Wolf scheduled sentencing for Aug. 18 following the conviction of former Massachusetts House Speaker Salvatore DiMasi and an associate on corruption charges.

DiMasi was convicted Wednesday in a scheme to steer two state contracts worth $17.5 million to a software firm in exchange for payments to the powerful lawmaker and two of his close friends.

Wolf allowed DiMasi to remain free until then, with the provision that he cannot leave New England.

A visibly distraught DiMasi turned to hug his crying wife and stepdaughter after the verdict was read. He was convicted of conspiracy, extortion and theft of honest services by fraud.

Also convicted of conspiracy and fraud was lobbyist Richard McDonough. Accountant Richard Vitale was acquitted. Both are close friends of DiMasi. A fourth man, former software salesman Joseph Lally, pleaded guilty before trial and testified against the others.

DiMasi, a Democrat, who resigned in 2009, was the third consecutive House Speaker to leave office under an ethics cloud.

The most serious counts against DiMasi carry a maximum 20 years in prison. U.S. Attorney Carmen Ortiz said she’d seek “significant jail time” for DiMasi.

“Justice has been served and the culture of corruption on the Hill has been dealt another blow,” she said.

But DiMasi’s attorney, Thomas Kiley, said he would appeal the verdict.

“Sometimes, jurors don’t get it quite right,” he said.

DiMasi, who maintained his innocence, said he had no second thoughts about his actions as a lawmaker.

“I was a legislator who did the best I could and I made a lot of good decisions and I helped a lot of people,” he said. “I don’t think that there was a full story told about my record and what I accomplished as a speaker or legislator. I think that was all lost in this case.”

Prosecutors said DiMasi used his position as one of the state’s most powerful politicians to assure that the Cognos firm received the software contracts. In exchange, prosecutors said DiMasi received $65,000 in payments funneled through a law associate, while McDonough and Vitale received hundreds of thousands of dollars in payments disguised as lobbying or consulting fees.

Defense attorneys said the payments were legitimate and were not made in exchange for official actions by DiMasi, a key element of the federal “theft of honest services” statute, which has faced recent court challenges.

Vitale’s attorney, Martin Weinberg, said it was a bittersweet outcome for his client, an “enormously decent” man, because the three men are good friends.

The jury returned the verdict after deliberating over three days.

The appeals process could be lengthy. One possible avenue of appeal could be to revisit the federal “theft of honest services” statute, which has been criticized as overly broad by some defense attorneys.

House Speaker Robert A. DeLeo, who succeeded DiMasi as the Democratic leader of the House, said the verdicts were a blow to the public’s trust in government.

“What came out at trial was deeply troubling. I feel angry and disappointed,” DeLeo said in a prepared statement.

“Given the cumulative effect of recent cases of public corruption, I understand the negative feelings many have for public officials right now,” he said. “That is something we are working to change.”