President Donald Trump announced Sunday that Will Scharf, currently serving as White House staff secretary, will become White House counsel and assistant to the president effective September 1.

Scharf will replace David Warrington, who is departing for the private sector. The move comes ahead of the midterm elections and potential congressional investigations.

Trump made the announcement in a social media post, highlighting Scharf's role overseeing administrative work in the Oval Office. Scharf has served in the staff secretary position since the start of Trump's second term.

The White House counsel serves as the top legal adviser to the president and the White House. Scharf previously worked as a personal lawyer to Trump before his appointment to the administration.

The change takes effect at the beginning of next month.