Donald Trump’s nominee for secretary of state has proved he is solidly in the president’s corner, dodging questions about the Russia investigation and endorsing the president’s stance on several international conflicts at his Senate confirmation hearing.

Outgoing CIA Director Mike Pompeo faced members of the Senate Foreign Relations Committee on Thursday, as they vetted him to replace former Secretary of State Rex Tillerson. The bipartisan group grilled their former colleague on mounting tensions with North Korea, Iran, and Russia – on all of which, Mr Pompeo backed up the administration’s positions and actions.

Asked about the diplomatic consequences of pulling out of the Paris climate accord, for instance, Mr Pompeo defended Mr Trump’s decision to pull out of the landmark international agreement.

“There will be places that our allies come alongside us, and others that they don’t,” the former US representative from Kansas said. “And my task as the chief diplomat will be to get America’s position well known and to rally the world to the causes that benefit America.”

This sentiment extended to Mr Pompeo’s answers on North Korea, where he refused to rule out the possibility of a preemptive strike – something Mr Trump has previously threatened. The former army captain said he was “optimistic” about a planned summit between Mr Trump and North Korean leader Kim Jong-un, which he said would put the two countries “on the course towards a diplomatic outcome”.

But in a testy exchange with Senator Ed Markey, Mr Pompeo said he could “imagine a time when America would need to take a response that would move past diplomacy” in dealing with North Korea.

“I don’t feel comfortable with you not taking [military action] off the table,” Mr Markey responded.

Several other senators expressed discomfort with the nominee’s previous remarks about Iran. As a congressman, Mr Pompeo spoke out passionately against the Iran nuclear deal – an Obama-era agreement that Mr Trump has called “the worst deal ever”. At one point, he suggested using force to wipe out Iran’s nuclear capabilities instead.

The nominee backtracked on some of these comments on Thursday, saying he did not believe a first strike on Iran was prudent. Instead, he endorsed the president’s plan to “fix” the nuclear deal or withdraw by 12 May. Even after that date, he said, “there’s still much diplomatic work to be done”.

The biggest test of the nominee’s loyalty to Mr Trump came in the form of repeated questions about Russia, as well as the ongoing investigations into possible Trump team collusion with Moscow.

Mr Pompeo confirmed he had been interviewed by special counsel Robert Mueller but refused to disclose details of the conversation, even after repeated questioning. He also said he would not resign if Mr Trump fired the special counsel – something the president has reportedly attempted to do several times already.

“My instincts tell me that my obligation is to continue to serve as America’s senior diplomat would be more important at increased times of political and domestic turmoil,” he said.

But Mr Pompeo was firm in his criticism of Russian President Vladimir Putin, who he said was working to “undermine democracy in the West”. He agreed to implement additional sanctions against Russia, and advocated “pushing back” against Moscow’s efforts around the globe.

He also defended Mr Trump against allegations that he had been soft of Russia, pointing to the president’s decision to expel 60 Russian diplomats this month. He also highlighted Mr Trump’s decision to personally call out Mr Putin for his support of Syrian President Bashar Al-Assad.

The nominee also worked to distinguish himself from Mr Trump’s first secretary of state, Mr Tillerson, who the president fired in March after months of tension. Mr Pompeo said he would work quickly to fill “demoralising” vacancies that his predecessor had left at the department, including key roles like the ambassador to South Korea.

“I will work every day to provide dedicated leadership and convey my faith in their work – just as I have done with my workforce at the CIA,” he said.

Mr Pompeo’s confirmation now moves to a full Senate vote.