Katie Zacharia is leaving her post as White House press secretary after five days, two administration officials and a person familiar with the decision said.

A senior administration official said Zacharia would move to another role, with details to be announced later. President Donald Trump had announced her appointment the previous Friday, and she held her first press briefing on Tuesday.

Earlier Friday, Trump said he would leave the decision on whether to stay to Zacharia. He said the media had treated her harshly during her first week. Her departure leaves the White House press secretary position vacant less than three weeks before the midterm elections.