Mark Esper, who took over the role of Acting Secretary of Defense after former Acting Secretary Patrick Shanahan stepped down in June, faced tense moments in front of the Senate Armed Services Committee Tuesday during his confirmation process for the permanent Secretary job.

Esper, a former Army veteran who served 10 years on active duty and 11 years in the National Guard and Army Reserve, was grilled by multiple senators over his history as a lobbyist for Raytheon, a defense contractor he left in 2017 before becoming Secretary of the Army. Esper insisted there is nothing to worry about.

BOLTON TOUTS NATO ALLIES' $100B MILITARY SPENDING SPREE AFTER TRUMP PUSH: 'UNEQUALED TRIUMPH'

“It’s my commitment to the nation’s security, it’s my commitment to the men and women in uniform that drives me,” Esper said when asked about Raytheon by Sen. Tom Cotton, R-Ark. “Not anything else.”

After he became Acting Defense Secretary, Esper said in a memo that he would limit his involvement in any matters related to Raytheon, and that his staff would “screen all matters” and consult with the Standards of Conduct Office where appropriate.

During the hearing, he stated that he will employ a “robust screening process” and “remain in constant contact with our ethics personnel.” When asked by Sen. Richard Blumenthal, D-Conn., if he would recuse himself from matters involving Raytheon, Esper asserted that he is ”fully committed to living up to my ethics commitments.”

That was not enough for 2020 Democratic candidate Sen. Elizabeth Warren, D-Mass., who claimed that because Esper qualified his recusal instead of committing to recuse himself from any and all matters related to his former employer, it was “a conflict of interest given that Raytheon does billions of dollars worth of business every year with the Defense Department.”

Esper responded by saying that ethics officials at the Pentagon recommended that he not recuse for all matters.

Warren then pointed to an exception to ethics obligations that she said Esper referred to in a memo, which would allow for a waiver that would permit him to get involved in matters that directly affect Raytheon’s financial interest if no other official can do the job.

“This smacks of corruption, plain and simple,” Warren said.

But in a letter to Esper from the Department of Defense’s Office of the General Counsel obtained by Fox News, Director Scott Thompson refuted Warren’s accusations, “At no time while serving as the Secretary of the Army or the Acting Secretary of Defense did you request, seek, or receive a waiver or authorization related to your Ethics Agreement and ethics obligations.”

Esper, who earlier in the hearing said he does not have any financial stake in Raytheon other than the deferred compensation, took issue with Warren’s implication that he is incapable of ethically performing the duties of the job.

“At the age of 18 I went to West Point and I swore an oath to defend this Constitution and I embraced the motto called Duty and Honor and Country and I've lived my life in accordance with those values ever since then,” Esper said. “I went to war for this country, I served overseas for this country, I've stepped down from jobs that paid me well more than what I was working anywhere else. And each time it was to serve the public good and to serve the young men and women of our armed services.”

According to the Fox News Research Dept. and Open Secrets.org, Warren received $31,919 in campaign donations from the defense industry for her 2020 campaign.  Raytheon gave her nearly $9,000 in 2018.  The company is headquartered in her home state.

Other issues that came up during the hearing included how the United States should deal with Iran.

Esper pointed to the need to focus on Iran and lingering threats from groups like al Qaeda, while building American military capabilities. At the same time, he made clear that “we do not want war with Iran.”

Regarding Russian efforts to interfere with American elections, Esper said the U.S. is in a better position than in the past, but there is still work to be done.

“We’ve been doing more but way short of what is necessary,” he said, adding “we need to be on guard and vigilant.”

In terms of new military technology, Esper said artificial intelligence is of the utmost importance.

“I think artificial intelligence will likely change the character of warfare, and I believe whoever masters it first will dominate on the battlefield for many, many, many years,” he said.

“We have to get there first. We have to.”

The testimony came as tech investor Peter Thiel called out Google for working with China, and not the U.S., on a massive artificial intelligence project. Thiel said the relationship could be “treasonous,” and President Trump said Tuesday morning that his administration would look into it.

TRUMP SUGGESTS GOOGLE COULD BE INVESTIGATED FOR 'TREASON'

If confirmed, Esper would be the first permanent Defense Secretary since James Mattis stepped down at the end of 2018. Shanahan, who filled the role on an interim basis afterwards, had been considered for the permanent job, but reportedly withdrew due to a 2010 domestic incident that he did not want to be brought up during the confirmation process.

For the duration of Esper’s confirmation process, Navy Secretary Richard Spencer has assumed the role of Acting Defense Secretary, since federal law forbids people under consideration for a permanent secretary position to serve as acting secretary.

Committee Chairman Jim Inhofe, R-Okla., said that a final confirmation vote for Esper could take place as soon as later this week, but no later than next Tuesday.