TRENTON, N.J. — U.

S. Sen. Bob Menendez will resign Aug.

20 following his conviction for taking bribes for corrupt acts including acting as an agent of the Egyptian government, he wrote in a letter to New Jersey’s governor obtained by The Associated Press. Menendez had insisted after the July 16 verdict that he was innocent and on Tuesday in his letter promised to appeal “all the way,” including to the Supreme Court, he wrote to fellow Democrat, Gov. Phil Murphy.

The roughly month-long delay in leaving gives his staff time for an orderly transition, Menendez wrote. He did not mention the federal conviction in the letter but cited his work helping Superstorm Sandy victims and getting transit funding, among other items, and addressed the governor directly, reminding him that he had once praised Menendez — before calling for his resignation. “These successes led you, Governor, to call me the ‘Indispensable Senator,”‘ he wrote.

The Senate received a copy of Menendez’s resignation letter, according to Sen. Peter Welch of Vermont, who was presiding in the chamber on Tuesday. The resignation gives Murphy the ability to appoint someone to the Senate for the remainder of Menendez’s term, which expires on Jan.

3. The seat was already up for election on Nov. 5.

Democrats have nominated U.S. Rep.

Andy Kim, who’s in a strong position in the Democratic-leaning state. He faces Republican Curtis Bashaw. Menendez, 70, was convicted of charges that he sold the power of h.