Updated

Ashton Carter, President Obama's nominee for defense secretary, pledged Wednesday that he would not bend to administration pressure to increase the pace of detainee transfers from the U.S. prison in Guantanamo Bay.

Citing recent reports that the Obama administration is expecting the new Pentagon chief to move more aggressively on emptying Gitmo of its detainees than outgoing Defense Secretary Chuck Hagel had, Sen. Kelly Ayotte, R-N.H., asked Carter to “make a commitment” not to succumb to presidential pressure.

“Absolutely senator,” Carter answered at his Senate confirmation hearing.

While the White House can push for a prisoner release or transfer, the decision is ultimately left to the defense secretary.

“I understand my responsibilities under that statute,” Carter said. “I will play it absolutely straight.”

Carter, a former official in Obama's Pentagon, was also asked Wednesday what he would do to combat the ongoing problem of sexual assaults in the military.

“The problem of sexual assault persists in our military,” he said, “It’s widespread in our society and is particularly offensive in our military.”

“We’ve got to root it out,” he said.

The hearing before the Senate Armed Services Committee covered ample ground, with the nominee facing questions about terrorism, Russian aggression, Guantanamo and more.

Addressing a pressing issue on Capitol Hill, Carter said he's inclined to back increased U.S. assistance to Ukraine, including lethal arms, to fight anti-government rebels in Ukraine backed by neighboring Russia.

The White House is reconsidering its opposition to giving Ukraine defensive weapons and other lethal aid to help its struggling military repel the insurgents backed by Moscow. That would be a possible escalation that has been strongly supported by many members of Obama's national security team, but it also would risk turning Ukraine into a proxy war with Russia.

Carter said that Russia's military moves in Ukraine are "a clear violation" of a 1994 commitment that Russia made to respect the sovereignty of the newly independent Ukraine as part of Ukraine's agreement to give up the nuclear weapons it inherited from the former Soviet Union.

During his confirmation hearing, Carter also warned the U.S. faces "very real dangers" from "malignant and savage terrorism" -- a day after a video surfaced showing the grisly execution of a Jordanian pilot by terrorists.

"These dangers ... include continuing turmoil in the Middle East and North Africa, and the malignant and savage terrorism emanating from it; an ongoing war in Afghanistan; the reversion to old-style security thinking in parts of Europe; the long-standing tensions from the past and the rapid changes in Asia, and the continuing need for the stabilizing role of the United States in that region which is so important to the future; the continuing imperative to counter the spread or use of weapons of mass destruction; and new dangers in new domains like cyber," he said.

In advance of the hearing, Carter also told senators that counterterror operations may need to be expanded to stem the tide of foreign fighters joining up with the ISIS terror group.

"I believe foreign fighters pose a threat to the U.S., and that this threat is exacerbated by the ongoing political and security instability in Libya," Carter said in a written response to senators' questions ahead of his Senate Armed Services Committee hearing. "If confirmed, I will focus attention on the foreign fighter flow as the department works with regional partners in North Africa to address the challenge posed by the terrorist safe haven in Libya and broader counterterrorism issues."

Carter faced the panel one day after the terror group released a grisly video showing a captured Jordanian Air Force pilot being burned alive. In response to written questions from the committee, Carter said that he is aware of reports that ISIS may try to expand into Afghanistan, and that he will work with NATO coalition partners to ensure that does not happen.

Carter also said he would consider changing plans for withdrawing all U.S. troops from Afghanistan by the end of 2016 if security conditions worsen. About 10,600 U.S. troops remain in Afghanistan.

Wednesday's hearing focused as much on Obama's foreign policy as on Carter's own vision for the Defense Department. But lawmakers voiced preliminary support.

At the start of the hearing, committee Chairman Sen. John McCain, R-Ariz., praised Carter as an "honest, hard-working and committed public servant."

Carter also told senators that the Defense Department needs to end wasteful practices that undermine public confidence even as he criticized the automatic spending cuts called sequestration.

Another thorny issue Carter faces is an uncertain outlook for the defense budget. In his remarks, Carter acknowledged that the Pentagon must end wasteful practices that undermine public confidence even as he criticizes the automatic spending cuts known as sequestration.

"I cannot suggest support and stability for the defense budget without, at the same time, frankly noting that not every defense dollar is spent as well as it should be," Carter said. "The taxpayer cannot comprehend, let alone support, the defense budget when they read ... of cost overruns, lack of accounting and accountability, needless overhead and the like. This must stop."

If confirmed, Carter would be the fourth secretary of Defense to serve under Obama, after Robert Gates, Leon Panetta, and Hagel. The relationship between the White House and the Pentagon has often been strained, with some officials in the department saying Obama views the military skeptically and centralizes decision-making in the West Wing. Hagel, in particular, is said to have grown particularly frustrated with the policymaking process overseen by national security adviser Susan Rice. Gates and Panetta have publicly aired their grievances with what they saw as White House micromanagement.

Carter served twice previously in Obama's Pentagon, most recently as deputy defense secretary from 2011 to 2013. He was assistant secretary of defense for international security policy during the administration of President Bill Clinton.

Carter would be the first defense secretary who has not served in the military or Congress since Harold Brown, who was appointed by President Jimmy Carter and led the Pentagon from 1977 to 1981.

The Associated Press contributed to this report.