JERUSALEM — Facing indictment for breach of trust and fraud, Israel’s foreign minister, Avigdor Lieberman, resigned his post Friday afternoon amid mounting political pressure, upending the campaign landscape five weeks before national elections.

Mr. Lieberman, a powerful but polarizing figure, wrote on his Facebook page, “I know that I committed no crime,” but said he was stepping down so “I will be able to put an end to this matter swiftly and without delay and to clear my name completely.”

Mr. Lieberman, who is also a member of Parliament, indicated that he still hoped to compete in the Jan. 22 balloting, suggesting a possible plea bargain. The expected indictment, which prosecutors announced on Thursday, concerns a relatively minor offense compared with a broader case of money laundering and fraud that was dropped after an investigation stretching for more than 12 years.

“I believe that the citizens of the State of Israel are entitled to go to the polling stations after this matter has already been resolved,” Mr. Lieberman’s statement said. If a legal ruling could be made before the elections, “I might continue to serve the State of Israel and the citizens of Israel as part of a strong and united leadership that will cope with the security, political and economic challenges facing the State of Israel.”