Under intense questioning from a judge Thursday, Yakima County prosecutors withdrew their request to hold a closed court hearing and seal records in the case against Kevin Harper.

Superior Court Judge Ruth Reukauf also repeatedly questioned whether prosecutors can revoke an agreement that allowed Harper to plead guilty to theft and firearms charges rather than face trial on murder charges for the deaths of a West Valley family more than two years ago.

Prosecutors had asked for a closed hearing, saying they have new evidence that is inflammatory and argued it would harm Harper’s chances for a fair trial if it were disclosed publicly.

The motion was opposed by Harper’s attorney, the Yakima Herald-Republic and Yakima’s three television news stations.

But instead of a showdown over an issue of open courts, the hearing veered into an even more contentious and sometimes confusing direction as Reukauf questioned the legality of a once-secret cooperation agreement that Harper signed in October as part of the plea deal.

“There is great inconsistency in this document, to put it mildly,” she said at one point. “I don’t even know that this is an enforceable document.”

Under the plea deal, prosecutors said they would drop three aggravated first-degree murder charges against Harper in the deaths of Bill Goggin, his wife, Pauline, and his 98-year-old mother, Bettye. The three were killed in February 2011 in what investigators believe was a burglary gone bad at their home in the gated Falcon Ridge community in Yakima’s West Valley.

In exchange for Harper’s guilty plea to two relatively minor charges — first-degree unlawful possession of a firearm and second-degree possession of stolen property — related to the theft of a Western-style .22-caliber pistol from the Goggin home, prosecutors agreed to recommend a prison sentence of just over seven years. They also agreed to drop the murder charges when Harper was sentenced.

The catch has been that while he remains jailed, a sentencing date has not been set.

Prosecutors now want to revoke the agreement, saying they have new evidence that apparently again points to Harper, 31, as the prime suspect.

In an often-heated debate Thursday, deputy prosecutor Steve Jackson clashed with defense attorney Pete Mazzone as Reukauf expressed frustration with the course of the arguments.

Prosecutors had sought to nullify the plea deal, arguing Harper had failed to adhere to a cooperation agreement that was part of the plea. But exactly how Harper violated the agreement was not something prosecutors had wanted to argue in public.

Prosecutors said the disclosure they had sought to keep secret involved a polygraph exam that Harper took. While noting it would be inadmissible in court, they argued that releasing the results would hurt Harper’s chance for a fair trial. They noted the case has attracted widespread pre-trial publicity.

Reukauf questioned how the disclosure would be different than any other evidence so far on the record.

She said the only difference between this case and other high-profile multiple murder cases — specifically the murders of four members of the Skelton family of Outlook in 1993; the brutal stabbing of the Nickoloffs, an elderly Parker couple, in 1988; and the execution-style slayings of Ricky Causor and his 3-year-old daughter in Yakima in 2005 — is the public’s heightened interest in the way the sheriff’s and prosecutor’s offices have handled the case.

The plea agreement followed disclosures that investigators had eavesdropped on calls between Harper and his attorney and failed to follow up on reports that might have provided Harper with an alibi. The prosecutor has been cited for contempt of court and fined $1,000 for failing to turn over evidence to defense attorneys in a timely fashion.

Mazzone again complained that prosecutors have not turned over the names of witnesses and other information potentially critical to the defense.

During the course of the hearing, it became clear that in addition to the polygraph test, the new evidence includes recanted statements by Harper’s now ex-wife, Crystal Gray-West.

The admission inflamed Harper’s defense attorney, Mazzone, who immediately told the court that experts had debunked the results of the polygraph. Jackson muttered, “That conclusion’s in dispute.”

Meanwhile, the cooperation agreement repeatedly came under sharp questioning from Reukauf, who noted it was only recently filed with the court and suggested it should be more properly be described as an immunity contract.

Reukauf read sections of the agreement, which she said suggested Harper and Gray-West were required only to “cooperate” against other suspects.

“It doesn’t make a lot of sense to me,” she said at one point, adding it appeared the thrust was “looking at it as prosecution of other people.”

The judge suggested that if Harper has not violated the agreement, “then I don’t know if we can unring the bell.”

As a result, she ordered another hearing just to argue whether the agreement is an enforceable contract. Due to attorney availability, the hearing is tentatively set for Sept. 9 at the earliest.

• Chris Bristol can be reached at 509-577-7748 or cbristol@yakimaherald.com. Follow him on Twitter at twitter.com/ChrisJBristol.