President-elect Donald Trump met with Bharara in New York on Wednesday and asked him to stay on. | Getty Trump opts to keep Preet Bharara as U.S. attorney for Manhattan

Preet Bharara, who has served as U.S. attorney for the Southern District of New York since he was appointed by President Barack Obama in 2009, will stay on the job.

President-elect Donald Trump met with Bharara in New York on Wednesday and asked him to stay on. Bharara, who has won praise for his prosecutions of corrupt public officials, accepted the offer.

“The president-elect asked, presumably because he's a New Yorker and is aware of the great work that our office has done over the past seven years, asked to meet with me to discuss whether or not I'd be prepared to stay on as the United States attorney to do the work as we have done it, independently, without fear or favor for the last seven years,” Bharara told reporters after the meeting, per a pool report. "We had a good meeting. I said I would absolutely consider staying on. I agreed to stay on. I have already spoken to Senator Sessions, who is as you know is the nominee to be the attorney general. He also asked that I stay on, and so I expect that I will be continuing to work at the southern district.”

Bharara is widely respected on both sides of the aisle. He won the conviction of former Speaker of the New York State Assembly, Sheldon Silver, in May.