As Mr. Netanyahu has drifted steadily to the right, the left has migrated to the center, after years of violence in the second Palestinian uprising of the early 2000s and the absence of a viable peace process since.

Mr. Netanyahu has benefited from strong support from President Trump, who in the past two years has withdrawn from the Iran nuclear deal, recognized Jerusalem as Israel’s capital and just two weeks ago recognized Israel’s sovereignty over the Golan Heights.

The Trump administration weighed in again on Monday, declaring the Iran Revolutionary Guard Corps a terrorist organization. By Monday night in Israel, Mr. Netanyahu was boasting on Twitter in Hebrew — but not in English — that this was in fulfillment of “another important request of mine.”

But Mr. Netanyahu’s pursuit of a fourth consecutive term came as he faces indictment for bribery and other corruption charges. The evidence in those cases, which was kept under wraps until after the election to avoid leaks that could tilt the contest against Mr. Netanyahu, are now to be turned over to lawyers in the case, meaning Mr. Netanyahu could be plagued by damaging reports while he tries to assemble a coalition.

And it could be difficult for him to remain in office once formal criminal charges are lodged against him, possibly as soon as late summer.

Mr. Netanyahu spent much of the past year undermining law enforcement officials and the gatekeepers of Israel’s liberal democracy, railing against the police, the attorney general and what he called the “leftist” mainstream media, trying to delegitimize his critics and organizations working for Palestinian rights. His government has also worked to curb the powers of the Supreme Court.