Lagging in polls and campaign funds in the race for state attorney general, John Morganelli came to Norristown on Monday to criticize Montgomery County Commissioner Josh Shapiro for taking campaign contributions from companies that received lucrative county contracts.

Morganelli, top prosecutor in Northampton County for more than two decades, has struggled to gain traction in the statewide Democratic primary against Shapiro and Allegheny County District Attorney Stephen Zappala Jr.

Standing on the steps of the Montgomery County Courthouse, Morganelli said Shapiro's acceptance of donations from companies that receive county contracts was hypocritical because Shapiro is campaigning on a promise to restore integrity to the Attorney General's Office.

He listed six companies or individuals who donated to Shapiro in recent years and were awarded Montgomery County contracts.

Shapiro also received a $2,500 contribution from McCormick Taylor, an engineering firm, in 2015, one month before, Morganelli said, the company received a county contract. A principal of McCormick donated $1,000 to Shapiro this month.

Morganelli said Shapiro accepted $30,000 in contributions from the head of Allan Myers Construction Co. between 2012 and 2015, and the company received a multimillion-dollar contract with the county for highway work.

"Josh is great at giving lofty speeches and lecturing everyone in ethics and integrity," he said. "Meanwhile, he has his hand out to all these vendors."

Shapiro's campaign shot back with a statement calling Morganelli's attacks desperate and "a kamikaze campaign."

Campaign manager Joe Radosevich said Morganelli has accepted contributions from defense attorneys with whom he negotiates.

Companies bidding for contracts in Montgomery County are required on their applications to disclose and explain any political contributions to county officials.

Campaign finance reports last week showed Shapiro has double the cash of each of his opponents. He has raised more than $2 million and has $1.8 million cash on hand.

Zappala's campaign reported raising $611,000 during the same time period – Jan. 1 through March 7 – and has $1 million on hand. Morganelli trailed with $118,000 raised and $607,000 on hand.

The winner of the April 26 primary will face one of two Republican candidates: State Sen. John Rafferty, who has the support of the state GOP, or Joe Peters, a former prosecutor who worked briefly for Attorney General Kathleen G. Kane.

Kane, a Democrat, is not seeking a second term. She is facing a criminal trial on perjury and other charges for allegedly leaking secret grand jury information to a reporter to embarrass a political foe.