Washington (CNN) President Donald Trump 's nominee to become the next chairman of the Joint Chiefs of Staff told senators Thursday that if confirmed, he "will not be intimidated into making stupid decisions" and pledged to provide the best military advice regardless of consequences to himself.

Current Army Chief of Staff General Mark Milley offered that particularly blunt response during his confirmation hearing before the Senate Armed Services Committee where he fielded several questions about how he would function as the President's principal military adviser and handle the pressure of delivering his own opinions in the Oval Office.

If confirmed, Milley will succeed outgoing chairman of the Joint Chiefs, Gen. Joseph Dunford, to become the highest-ranking military officer in the country and principal military adviser to the president.

He would take over the job at a time when the Trump administration faces a myriad of geopolitical threats, including increasing tensions with Iran, as well as, challenges from rivals like China and Russia.

There are also concerns about the lack of permanent appointees at the Pentagon.

Perhaps the most notable exchange occurred with Milley was asked by Sen. Angus King, an independent from Maine, whether he would be intimidated by anyone.

Milley answered bluntly: "Absolutely not. By no one, ever."

"I'll give my best military advice, it will be candid, it will be honest, it will be rigorous and thorough and that's what I will do every single time," he said.

King pressed Milley on the issue, noting that he is confident the four-star general will assert his views, even if they run counter to the opinion of the President, but felt it was important to emphasize that point.

"I believe that I think it's very important to emphasize, the Oval Office is an intimidating place. The president of the United States is the most powerful leader in the free world and to be willing to say Mr. President you are wrong about this or this is the consequences if it's something that he or she doesn't want to hear is just, there is no more important responsibility in your career that you will have had to make that statement," King said.

"Senator, and I would say it applies to Gen. Dunford and most of us who have seen a lot of combat, we buried these soldiers. Arlington is full of our comrades and we understand absolutely full well the hazards of our chosen profession, we know what this is about and we are not going to be intimidated into making stupid decisions," Milley responded.

"We will give our best military advice regardless of consequences to our self," he added.

Earlier in the hearing, Hawaii Democrat Sen. Mazie Hirono asked Milley under what conditions he would resign from his position if his advice and counsel on major policy issues were not being heeded.

"I think it would be a function of something that was illegal, unethical or immoral. That's what I've been brought up with since I was second lieutenant and that would probably be cause for resignation," Milley answered, noting he would expect the same from any US service member, no matter their rank.

That line of questioning prompted some push back from Republican Sen. Tom Cotton who attempted to draw a distinction between an illegal and unwise order.

"So what the president should expect from you, what the secretary of defense should expect of you, what the nation expects from you is you always give your professional best military judgment?" Cotton asked.

"That's correct. Always," Milley said.

Asked if he will "then implement lawful orders even if you disagree with them personally or think they might be ill-advised," Milley answered: "Absolutely."

Trump tapped Milley to be the next chairman of the Joint Chiefs last December. CNN previously reported that he interviewed with Trump for the position on November 14 for more than an hour.

Milley who holds degrees from Princeton University and Columbia University, is known to be liked by Trump. He has commanded units with the 10th Mountain Division and the 101st Airborne and served multiple combat tours in Iraq and Afghanistan.

After becoming chief of staff of the Army in 2015, Milley helped oversee the army's transition away from large-scale counterinsurgency campaigns in places like Iraq and Afghanistan, focusing instead on near-peer challenges from Russia and China.

He helped launch the Army's Security Force Assistance Brigades to help reduce the strain on Special Forces units while also ensuring that the army maintained the ability to advise friendly forces combating extremist groups.

Milley was also involved in the launch of Army Futures Command which is tasked with helping modernize the service.