John Hanger withdrew as a Democratic candidate for Pennsylvania governor Thursday, saying opponent Tom Wolf's "startlingly effective" TV campaign left him "no path to victory."

But Hanger, leaving the race only two days after qualifying for the primary ballot, claimed a measure of success, saying his campaign had accomplished its main goal of "proposing numerous, detailed policy solutions that will rebuild Pennsylvania."

"We have driven the debate on issue after issue, such as charter school accountability, reforming our cruel marijuana policies that harm patients and ruin the lives of good people, as well as energy and environmental policy," he said. "These solutions are now part of the vernacular of the Democratic campaign, and they will be part of the policy package that will persuade Pennsylvanians to elect a Democrat as governor in November."

But it was the TV campaign waged by Wolf, a wealthy businessman, that prompted him to withdraw, Hanger said.

"Tom Wolf's television campaign has been startlingly effective, and he has taken a commanding lead, having reached support of 40 percent or more," he said in a statement. "With no path to victory, to press on could cause damage to the issues and people for which we campaigned."

He praised all of his five remaining opponents and said he was sure who ever won the primary would defeat Republican Gov. Corbett in November.

Hanger never broke single digits in the most recent independent public opinion polls, but he had a committed core of liberal activists behind him, and won the straw poll at the state's Progressive Summit of left-leaning groups March 8 in Harrisburg.

He became identified with the cause of legalizing marijuana, which he mentioned at every campaign appearance and pushed during debates.

Hanger said he approached the issue as a matter of social justice - it made no sense for the authorities to lock up so many people for pot possession especially because, he said, African Americans were disproportionately arrested.

Hanger advocated decriminalization of possession of small amounts of the drug, immediate legalization of medical pot, and then within two years, full legalization with taxes. Recent polls by Mercyhurst and Quinnipiac universities showed growing support for these ideas in Pennsylvania. Hanger will no longer be the one to carry the torch.

Hanger, who lives in Hershey was a utility commissioner under former Gov. Robert Casey, and was secretary of the Department of Environmental Protection under former Gov. Ed Rendell. He lives in Hershey, Pa.

The remaining candidates: York businessman Tom Wolf, U.S. Rep. Allyson Y. Schwartz, state Treasurer Rob McCord, former DEP secretary Katie McGinty and former state Auditor General Jack Wagner of Pittsburgh.