A day after securing their parties' nominations for attorney general, Democrat Josh Shapiro and Republican John Rafferty wasted no time in jumping into the general-election campaign.

Hours after Shapiro told reporters Wednesday that he was best qualified to reform the criminal-justice system and bring integrity to the office, Rafferty suggested that his rival had other plans.

He said that the position of attorney general should not be used as a stepping-stone to the governorship.

"I would challenge my opponent to join me in pledging to take politics out of the A.G.'s Office by promising not to seek higher office," he said.

Shapiro, a Montgomery County commissioner, and Rafferty, a state senator from Montgomery County, won their parties' primaries Tuesday by substantial margins.

Shapiro won a bitterly contested race against Allegheny County District Attorney Stephen Zappala Jr. and Northampton County District Attorney John Morganelli, who both criticized Shapiro's lack of prosecutorial experience.

On Wednesday, Shapiro noted that he won the Democratic vote in 44 of the 67 counties, and was the only candidate with experience in executive leadership and a plan for the future of the Attorney General's Office.

"I've talked about my vision for this office," he said. "The way it should be used to be a progressive force for change."

Rafferty, who defeated former organized-crime prosecutor Joe Peters in the Republican primary, offered a glimpse of his campaign strategy against Shapiro on Wednesday.

Rafferty has said he would serve his full term if elected and would not run for a higher office while he was attorney general.

The winner of the November election will replace Kathleen G. Kane, a Democrat who chose not to seek a second term as she awaits trial on charges that she leaked secret grand jury information and lied about it.