Amid growing concerns about his successor's treatment of the media, President Barack Obama began his final press conference on Wednesday by stressing the importance of a free and adversarial press corps.

"We are accountable to the people who send us here," Obama said of his office. "You're not supposed to be sycophants. You're supposed to be skeptics."

"Having you in this building has made this place work better," the president said.

Obama's remarks come as President-elect Donald Trump's transition team mulls the possibility of moving the White House press briefing out of its current location and into a different building. On Wednesday, Trump told Fox News he would not move the briefing initially, but suggested that space issues would force his administration to pick which journalists are allowed in.

Related: Is Trump White House preparing to treat press as 'opposition party'?

In the Esquire report that first broke the news that a move for the press briefing was being considered, a "senior official" with the transition team was quoted as calling the media "the opposition party" and saying "I want 'em out of the building. We are taking back the press room."

One day before Obama's press conference, White House press secretary Josh Earnest called on journalists to protect the daily briefing, "and the regular exchange that senior officials have at the White House with all of you to answer tough questions, to be held accountable, to respond for calls for greater transparency."

"My hope is that the essence of this relationship between the White House Press Corps and the White House Press Office will be preserved and it will be maintained for future generations to benefit from," Earnest said.

Obama reiterated that sentiment in his own remarks on Wednesday as he wished the journalists in the room goodbye.

"Thank you very much, press corps," he said. "Good luck."