When Avichai Mandelblit was being considered for the post of Israeli attorney general, the selection committee had a question: If there was enough evidence, would he prosecute the man who was then his boss, Prime Minister Benjamin Netanyahu?

Mr. Mandelblit did not hesitate, according to a person involved in the vetting process.

Yes, he said.

Now that answer is about to be tested.

Mr. Mandelblit, a soft-spoken jurist, is expected to announce as early as Thursday whether he intends to indict the prime minister in any of three separate corruption cases. His decisions, coming amid an election campaign in which Mr. Netanyahu is seeking a fourth consecutive term, are bound to anger the prime minister’s supporters, his opponents, or both.

“Everybody in Israel knows today that Mandelblit will be accused by 50 percent of the population no matter what he decides,” said Yedidia Z. Stern, a law professor and senior fellow at the Israel Democracy Institute. “There is no way he can go out in the rain and not get wet.”