Updated

President Obama, at his final press conference in office, on Wednesday defended his controversial decision to commute the bulk of Chelsea Manning’s 35-year prison term for leaking classified documents – claiming the former intelligence analyst served a “tough” sentence, and disputing the notion that clemency could embolden future leakers.

“I feel very comfortable that justice has been served and that a message has still been sent,” the president said.

The president has faced mounting bipartisan criticism over the commutation, announced as part of a late wave of clemency decisions a day earlier. Manning, who has served more than six years of the 35-year sentence, will now be released in May.

The president also used his last meeting with the press to discuss his plans for life after the White House, offer general advice to successor Donald Trump and even offer a few kind words about the media. The session for the most part was not contentious, but he did start by responding to critics who warned his decision with Manning set a dangerous precedent.

“Chelsea Manning has served a tough prison sentence, so the notion that the average person who is thinking about disclosing vital classified information would think that it goes unpunished, I don’t think would get that impression from the sentence that Chelsea Manning has served,” Obama argued.

Citing the time served and saying Manning’s sentence was “disproportionate,” Obama said: “It made sense to commute, and not pardon, her sentencing.”

The former Army analyst, a transgender woman who was known as Bradley Manning at the time of her 2010 arrest, had asked Obama last November to commute her sentence for giving classified government and military documents to the WikiLeaks website.

But Fox News has learned that outgoing Defense Secretary Ash Carter and other top Army leaders recommended against the commutation.

Republicans blasted the decision with House Speaker Paul Ryan calling it "outrageous" and saying Obama had set a "dangerous precedent" that anyone guilty of compromising U.S. national security will no longer have to pay for their crimes.

In an interview with Fox News set to air Wednesday on “Special Report with Bret Baier,” Vice President-elect Mike Pence said the commutation was a “mistake.”

“Private Manning is a traitor and should not have been turned into a martyr,” he said. “… Private Manning's actions compromised our national security, endangered American personnel downrange, compromised … individuals in Afghanistan who were cooperating with our forces by leaking 750,000 documents to WikiLeaks.”

Obama has two days left in office, before transferring power Friday to President-elect Trump, who has vowed to overhaul, unravel or at least revisit a number of major Obama policies including his signature health law.

The outgoing president largely refrained Wednesday from directly criticizing Trump or his plans, instead advising that he’ll have to end up relying on his team.

“You can’t do [this job] by yourself,” he said.

Obama also said, in response to a question about the Israeli-Palestinian peace process, "If you’re going to make big shifts in policy, just make sure you’ve thought it through."

Obama also used his final presidential press conference to thank the media for holding his administration’s feet to the fire, urging them to continue with the same “tenacity” after he leaves. In the year ahead, Obama said he plans to “do some writing,” reflect and spend time with his wife Michelle and his two daughters.

“Those are my priorities this year,” he said.

But he said he could be speaking out if he sees a threat to “core values,” including concerns about discrimination, obstacles to voting rights and the deportation of illegal immigrants who came to the U.S. as children.

That, in particular, he said, “would be something that would merit me speaking out.”

He added, “It doesn’t mean that I would get on the ballot anywhere.”

Asked about his place in history as the first black president, Obama said the country eventually would see others of every race and faith “rise up” to claim the office, though reiterating that “we’ve got more work to do on race.”

He closed the session by talking about his daughters and voicing confidence in America’s future: “At my core, I think we’re going to be okay.”

The Associated Press contributed to this report.