TRENTON, New Jersey (AP) — United States Senator Bob Menendez will resign on August 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, Governor Phil Murphy. The roughly monthlong 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 Senator 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 January 3. The seat was already up for election on November 5. Democrats have nominated US Representative Andy Kim, who’s in a strong position in the Democratic-leaning state.

He faces Republican Curtis Bashaw. Menendez, 70, was co.