An Erie County judge revoked bail and declared a mistrial Tuesday in the case of an accused rapist who allegedly drove his car dangerously close to the assistant district attorney who is prosecuting the charges against him.

William Payne was accused of driving his vehicle within a couple feet of the prosecutor at the intersection of Delaware Avenue and West Eagle Street and splashing her with water from a puddle just before 7 p.m. Monday, according to Roseanne Johnson, chief of the Erie County District Attorney’s Special Victims Bureau.

“The defendant engaged in an act of menace and intimidation,” Johnson said in urging Erie County Judge Kenneth F. Case to revoke the 48-year-old Buffalo man’s $25,000 bail.

Case agreed to the bail revocation but initially insisted the trial, which began Monday with jury selection, would continue because the basic facts of the proceedings had not been altered. However, he changed his mind after receiving word that some of the prospective jurors overheard details of the alleged car incident during discussions in the hallway of the courthouse.

To ensure Payne receives a fair trial, Case granted defense attorney Joseph A. Agro’s motion for the mistrial and the scheduled a new trial for Aug. 11.

Erie County District Attorney Frank A. Sedita III said his office is in the process of conducting an investigation to determine if the assistant district attorney’s claims can be corroborated by surveillance video from cameras on the courthouse building.

“Once we have the video, we will provide it to the court and to the defense,” Sedita said, adding that the investigation could lead to additional charges against Payne, depending on the findings.

Johnson told the judge that the assistant district attorney had left the courthouse on the Delaware Avenue side of the building and walked north to the intersection of West Eagle Street, where she noticed a black sedan at a traffic light adjacent to her.

The prosecutor then crossed west to the other side of Delaware and noticed that the car was still stopped at the light, though it had turned green. She then started to cross West Eagle in a northwest direction toward the City Court building. At that point, the car crossed Delaware in her direction.

“He drove straight through the intersection toward her, hit a puddle and splashed her up to her mid thigh,” Johnson said. “The windows of the car were not tinted and he turned toward her and she had a full frontal view of his face and identified him as William Payne.”

Upset by the incident, the assistant district attorney called Johnson, who was still at work, and Johnson went outside and discussed what had happened.

“This is obviously an attempt to menace and intimidate an assistant district attorney,” Johnson said. “There should be nothing short of bail revocation.”

Agro said he also plans to conduct an investigation, but expressed concerns that the district attorney’s office had not gone to nearby Buffalo Police Headquarters to seek an investigation or had not presented an affidavit to the court spelling out what happened.

Sedita later said his office had a legal obligation to alert the judge as quickly as possible.

“This is news to me, judge, and these are very serious allegations,” Agro said. “We are going to actively investigate this and see if a mistake has been made.”

Payne, in reacting to Johnson’s statements, shook his head and stretched out his palms, showing surprise at the allegations.

Agro pointed out that his client has no previous arrest record and is retired from the Army after serving about 20 years. He noted that the proceedings have been pending for more than a year with his client free on bail.

Case, in revoking bail, said that he has known the assistant district attorney for years and has no reason to doubt her truthfulness.

In arguing for the mistrial, Agro cited anticipated accounts in the media of the car incident as possibly tainting potential jurors’ view of Payne. He also said he foresaw the assistant district attorney using the incident to further build her case against his client, who was likely to testify on his own behalf.

“Next thing you know, the prosecutor will ask, ‘Well, did you try to kill me last week?’ ” Agro said.

The district attorney’s office declined to comment on whether the same assistant district attorney would continue to prosecute the case when the new trial starts in August.

Payne was charged Jan. 19, 2013, with third-degree rape and third-degree incest for allegedly raping a young woman in his apartment in September 2012.