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”.

Rex Tillerson fired: Trump has 'total confidence' in new Secretary of State Mike Pompeo

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”.

Donald Trump's first year: in pictures Show all 29 1 /29 Donald Trump's first year: in pictures Donald Trump's first year: in pictures Inauguration - 20 January 2017 US President Donald Trump acknowledges the audience after taking the oath of office as his wife Melania (L) and daughter Tiffany watch during inauguration ceremonies swearing in Trump as the 45th president of the United States on the West Front of the US capital in Washington on 20 January, 2017. Photographer Jim Bourg: "This photo was shot with one of two remote cameras. The cameras were monitored and triggered remotely and the pictures were transmitted to clients worldwide within minutes of being taken." Reuters/Jim Bourg Donald Trump's first year: in pictures Obama farewell address - 10 January 2017 US President Barack Obama wipes away tears as he delivers his farewell address in Chicago on 10 January, 2017. Photographer Jonathan Ernst: "In his final days in office, Obama made a visit home to Chicago. As he spoke from the stage to his wife and daughter in the audience, he became emotional when he talked about what they had sacrificed during his time in office. I turned from photographing the Obama women embracing to find him onstage wiping away tears." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Inauguration - 20 January 2017 A combination of photos shows the crowds attending the inauguration ceremonies to swear in U.S. President Donald Trump at 12:01pm (left) on January 20, 2017 and President Barack Obama sometime between 12:07pm and 12:26pm on January 20, 2009. Reuters/ Lucas Jackson/Stelios Varias Donald Trump's first year: in pictures Liberty Ball - 20 January 2017 US President Donald Trump and first lady Melania Trump attend the Liberty Ball in honour of his inauguration in Washington on 20 January, 2017. Photographer Jonathan Ernst: "What I see when I look at this picture is the end of a very long day, not to mention weeks and months of preparation by many photographers, editors and network experts and the beginning of everything since." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Inaugural Law Enforcement Officers and First Responders Reception - 22 January 2017 US President Donald Trump greets Director of the FBI James Comey as Director of the Secret Service Joseph Clancy (L), watches during the Inaugural Law Enforcement Officers and First Responders Reception in the Blue Room of the White House on 22 January, 2017. Photographer Joshua Roberts: "I have covered the White House for 16 years and normally either the President or the pool is in position when an event starts. In this case the President was not where anyone expected him to be. In fact, he was almost blocking the door when the pool came in. We had to scramble to find a position without bumping him or the furniture as he greeted and thanked members of law enforcement for their security efforts during the inauguration. Luckily, he greeted FBI Director James Comey a few seconds after the pool had made its way into the room." Reuters/Joshua Roberts Donald Trump's first year: in pictures Private phone calls to world leaders - 28 January 2017 US President Donald Trump, is joined by his staff, as he speaks by phone with Russia's President Vladimir Putin in the Oval Office on 28 January, 2017. Photographer Jonathan Ernst: "Very early in the Trump administration, weekends were as busy as weekdays. On Trump's second Saturday the official schedule said he would be making private phone calls to a number of world leaders including Russia's Vladimir Putin. I arrived early and, before sitting down at my desk walked up to Press Secretary Sean Spicer's office. He, too, was just taking his coat off. I gingerly made the suggestion that previous administrations had sometimes allowed photos of such phone calls through the Oval Office windows on the colonnade. To my mild shock, he didn't even think about it twice. "We'll do it!" he said. In truth, I really only expected the Putin call, but we were outside the windows multiple times throughout the day as the calls went on." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Senior advisor Kellyanne Conway - 27 February 2017 Senior advisor Kellyanne Conway (L) attends as US President Donald Trump welcomes the leaders of dozens of historically black colleges and universities (HBCU) in the Oval Office on 27 February, 2017. Photographer Jonathan Ernst: "We're often asked how much access we have to the Trump administration, and the answer is we have an awful lot. President Trump himself is very comfortable in the spotlight, and his aides are similarly unfazed by cameras. In this instance, senior advisor Kellyanne Conway was so comfortable in our presence she seemed not to consider the optics of kneeling on a Oval Office sofa to take pictures with her phone." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Angela Merkel heads to Washington - 17 March 2017 Germany's Chancellor Angela Merkel and US President Donald Trump hold a joint news conference in the East Room of the White House on 17 March, 2017. Photographer Jonathan Ernst: "Chancellor Merkel made one of the earliest important visits of any US allies to meet Trump in his first months in office. When world leaders give joint news conferences they don't always tend to give each other their full attention - but Merkel watched Trump intently at several key moments, and here seemed particularly rapt." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Trump welcomes truckers to the White House - 23 March 2017 President Trump reacts as he sits on a truck while he welcomes truckers and CEOs to attend a meeting regarding healthcare at the White House on 23 March, 2017. Photographer Carlos Barria: "The White House organised a listening session with truckers and CEO's of major American companies, regarding healthcare reform. An 18-wheeler tow truck was parked on the South Lawn of the White House and as Trump welcomed the truckers someone invited the him to come and sit in the driver's seat. Trump jumped into the cab and started yelling and pretending to drive - creating one of the most memorable pictures of the year. A lesson learned, always be prepared for the unexpected." Reuters/Carlos Barria Donald Trump's first year: in pictures Air Force One - 6 April 2017 US President Donald Trump talks to journalists members of the travel pool on board the Air Force One during his trip to Palm Beach, Florida on 6 April, 2017. Carlos Barria: "During the many trips to President Trump's residence in Florida it is usual to see the president coming to the back of the plane to chat with journalists. During one of the trips to the so called 'Winter White House', Trump had a long talk with reporters while the Air Force One entertainment system was playing one of the latest Star Wars movies. As I was listening to Trump talk I was also looking at the movie waiting for a part of the movie to frame the mood of the day. Of the many scenes, I choose the one with Darth Vader." Reuters/Carlos Barria Donald Trump's first year: in pictures 100 Days - 27 April 2017 US President Donald Trump speaks during an interview with Reuters in the Oval Office of the White House on 27 April, 2017. Photographer Carlos Barria: "A day before President Trump's hundred days in office I was part of the team that interviewed the commander-in-chief in the Oval Office. I was only allowed to photograph Trump during the last five minutes of the interview. The time was very tight so I had to move fast as I had pictures in mind that I wanted to shoot. I walked into the Oval Office and saw that the President had printed maps of the country showing areas in red where he won. I raised my hands holding my camera as high as possible to get the best view of the scene using a 16mm wide angle lens." Reuters/Carlos Barria Donald Trump's first year: in pictures 100 Days - 27 April 2017 US President Donald Trump reacts as he arrives at Harrisburg international airport, before attending a rally marking his first 100 days in office in Pennsylvania on 29 April, 2017. Photographer Carlos Barria: "President Trump travelled to Harrisburg, Pennsylvania to celebrate his hundred days in office with a victory rally. He was in friendly territory as he won with a big difference over his opponent Hillary Clinton in Pennsylvania, during the November elections. As usual when the commander-in-chief arrives local residents gather to greet him. This time a small group of military personnel attended the arrival. Surrounded by secret service agents Trump walked from the Air Force One and raised his hand in a sign of victory as the crowd cheered him on." Reuters/Carlos Barria Donald Trump's first year: in pictures White House staffers - 2 May 2017 White House Press Secretary Sean Spicer (L) and White House Chief of Staff Reince Priebus watch as US President Donald Trump presents the U.S. Air Force Academy football team with the Commander-in-Chief trophy in the Rose Garden of the White House in Washington on 2 May, 2017. Photographer Joshua Roberts: "Covering the White House does not just mean covering the President. White House staffers are an important part of the story and their relationship with the President and each other is an indicator of how things are going in the West Wing. The tendency is to focus exclusively on the President once an event starts but I always try to look around to see how people are reacting as things unfold." Reuters/Joshua Roberts Donald Trump's first year: in pictures Secret Service - 4 May 2017 Secret Service agents use a presidential limousine as cover from spraying water as US President Donald Trump lands via Marine One helicopter in New York on 4 May, 2017. Photographer Jonathan Ernst: "The best part of any trip to New York City with the sitting US President is the helicopter ride into Manhattan. The ride out at night can be stunning. Here, Secret Service agents protect themselves from the spray from the East River as Trump lands on the helipad." Reuters/Jonathan Ernst Donald Trump's first year: in pictures NATO Summit - 25 May 2017 US President Donald Trump and first lady Melania Trump wait the arrival of French President Emmanuel Macron (unseen) before a lunch ahead of a NATO Summit in Brussels on 25 May, 2017. Photographer Jonathan Ernst: "One of the best parts of travelling overseas for White House coverage is the chance to see the U.S. president in different environments and (literally) a different light. Here, Trump and his wife came out of the shadows to greet France's President Macron." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Trump meets Putin at G20 summit - 7 July 2017 US President Donald Trump meets with Russian President Vladimir Putin during their bilateral meeting at the G20 summit in Hamburg, Germany on 7 July, 2017. Photographer Carlos Barria: "On July 7, I witnessed one of the most important meetings of President Trump's first year in office. Trump met Russian President Vladimir Putin during a bilateral meeting at the G20 summit in Germany. The world's eyes were on these two leaders after speculation about Russian interference during the 2016 US elections. We entered the room for less than two minutes, where I took dozens of pictures. But there was this very interesting moment when Trump extended his hand to Putin for a handshake. Putin paused for a second and looked at Trump's hand. That was the picture that I was looking for, a little moment that seemed to say a lot." Reuters/Carlos Barria Donald Trump's first year: in pictures First lady - 8 July 2017 First lady Melania Trump chats with US President Donald Trump during their return from Germany at Joint Base Andrews, Maryland on 8 July, 2017. Photographer Carlos Barria: "After President Trump's trip to Germany he arrived back at Joint Base Andrews, Maryland. First Lady Melania Trump said goodbye to Trump as she was heading off in a different direction that day. While chatting a breeze blew Melania's hair up in the air." Reuters/Carlos Barria Donald Trump's first year: in pictures Made in America product showcase - 17 July 2017 Vice President Mike Pence laughs as President Donald Trump holds a baseball bat as they attend a Made in America product showcase event at the White House on 17 July, 2017. Photographer Carlos Barria: "This summer the White House organized an event to showcase 'Made in America' products. All kinds of exhibitors brought their products as the President and Vice President toured the event. One of the companies was Marucci Sport, a manufacturer of baseball bats based in Baton Rouge, Louisiana. As Trump approached a table full of baseball bats, photographers at the event, including me, rushed to get a good angle hoping that he would pick up a bat. As we predicted, he did. He took one and joked around as though he was hitting something hard. The only thing closer to him right there, was the media." Reuters Donald Trump's first year: in pictures White House staffers - 25 July 2017 Former campaign manager Corey Lewandowski says hello to reporters as he and White House advisors including Communications Director Anthony Scaramucci accompany President Trump for an event celebrating veterans at AMVETS Post 44 in Ohio, July 25, 2017. Jonathan Ernst: "The most visible person in any White House is naturally the President, followed by the press secretary. But there are also the staff who support them. For those of us covering the Trump administration, there seem to be more compelling figures in the West Wing than ever before. It's crucial to know who's who and why they're important. When I raised my camera and back-pedalled ahead of the group to take this image Lewandowski gave me a hello. I liked the photo, but had no idea it would go a little bit viral, especially since Scaramucci, who was the biggest mover and shaker that week, was hidden back in the pack. But I guess the image catches a glimpse of what it's like to be a West Wing staffer on the road." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Campaign rally - 3 August 2017 US President Donald Trump arrives at a rally in West Virginia on 3 August, 2017. Photographer Carlos Barria: "President Trump travelled to Huntington for one of his usual campaign rallies. While members of his family spoke to the crowd he was waiting under a black curtain to be introduced. Suddenly he walked onto the stage, one of the first frames that I took was of his hand. I set my exposure for the light on the stage hoping to create this dark background and it worked." Reuters/Carlos Barria Donald Trump's first year: in pictures Staring into the solar eclipse - 21 August 2017 Without his protective glasses on, US President Donald Trump looks up towards the solar eclipse while viewing with his wife Melania and son Barron at the White House on 21 August, 2017. Photographer Kevin Lamarque: "On a day when everyone, and I mean everyone, was told not to look at the eclipse without protective glasses, Trump, President of the United States, couldn't help himself." Reuters/Kevin Lamarque Donald Trump's first year: in pictures Hurricane Harvey - 2 September 2017 US President Donald Trump poses for a photo as he and first lady Melania Trump help volunteers hand out meals during a visit with flood survivors of Hurricane Harvey at a relief centre in Houston, Texas on 2 September, 2017. Photohrapher Kevin Lamarque: "Trump, eager to deliver the image of a hands-on response to Hurricane Harvey, made this visit to a relief centre and obliged this woman with a selfie as Melania continued to work." Reuters/Kevin Lamarque Donald Trump's first year: in pictures White House - 15 September 2017 Donald Trump welcomes 11-year-old Frank Giaccio as he cuts the Rose Garden grass at the White House on 15 September. Frank, who wrote a letter to Trump offering to mow the lawn, was invited to work for a day at the White House along the National Park Service staff. Frank was so focused on his task that he did not notice the President arrive to surprise him. He took his father jumping in to grab his attention and point Trump out. Photographer Carlos Barria said: “The image of Trump shouting at a kid who is mowing his lawn might have many interpretations in today's politically polarized United States. But for me it was just a kid who loved what he was doing, to the point he almost appeared to ignore the President." Reuters/Carlos Barria Donald Trump's first year: in pictures Take a knee - 27 September 2017 A man kneels with a folded U.S. flag as the motorcade of U.S. President Donald Trump passes him after an event at the state fairgrounds in Indianapolis, Indiana, U.S., September 27, 2017. In September, soon after Trump had made comments condemning NFL players who kneel during the national anthem, he made a day trip to a rally in Indianapolis. Jonathan Ernst managed to capture a man on one knee with a tri-folded flag and was able to use a portion of the sign on the building he was kneeling in front of to track the man down and tell his story in full. US Army veteran Marvin Boatright wanted to send a message against social injustice. Reuters/Jonathan Ernst Donald Trump's first year: in pictures Hurricane Maria - 3 October 2017 President Donald Trump throws rolls of paper towels into a crowd of local residents affected by Hurricane Maria as he visits Calgary Chapel in San Juan, Puerto Rico on 3 October, 2017. Photographer Jonathan Ernst: "During an afternoon visit to Puerto Rico for President Trump to survey damage from Hurricane Maria and greet some of its victims, Trump made a stop at a church where food and supplies were being distributed. Among the items were paper towels and Trump, apparently caught up in the moment, decided to distribute some of the rolls." Reuters Donald Trump's first year: in pictures Jared Kushner - 1 November 2017 White House Senior adviser Jared Kushner sits behind President Trump during a cabinet meeting in Washington on 1 November, 2017. Photographer Kevin Lamarque: "The role of Jared Kushner has gone through a series of changes. He began front and centre as a high profile adviser, but as time has passed and issues surrounding him have surfaced, he has become more of a background figure." Reuters/Kevin Lamarque Donald Trump's first year: in pictures Trump in China - 9 November 2017 Donald Trump and China's President Xi Jinping shake hands after making joint statements at the Great Hall of the People in Beijing on 9 November, 2017. Photographer Damir Sagolj: "It's one of those "how to make a better or at least different shot when two presidents shake hands several times a day, several days in row". If I'm not mistaken in calculation, presidents Xi Jinping and Donald Trump shook their hands at least six times in events I covered during Trump's recent visit to China. I would imagine there were some more handshakes I haven't seen but other photographers did. And they all look similar - two big men, smiling and heartily greeting each other until everyone gets their shot. But then there is always something that can make it special - in this case the background made of US and Chinese flags. The first time it didn't work for me. The second time I positioned myself lower and centrally, and used the longest lens I have to capture only hands reaching for a handshake." Reuters/Damir Sagolj Donald Trump's first year: in pictures Air Force One - 10 November 2017 US President Donald Trump boards Air Force One to depart for Vietnam from Beijing Airport in Beijing, China, November 10, 2017. Photographer Jonathan Ernst: "There is a Reuters photographer in the tight pool covering the US president for every appearance he makes 365 days a year. This was just one of 32 images of mine that were transmitted on the Reuters wire of President Trump visiting China and Vietnam that day. You never know when a sudden interaction, a gust of wind or a unique facial expression will lead to a striking image that grabs peoples' attention." Reuters/Jonathan Ernst Donald Trump's first year: in pictures ASEAN handshake - 13 November 2017 Donald Trump registers his surprise as he realises other leaders, including Russia's Prime Minister Dmitry Medvedev, Vietnam's Prime Minister Nguyen Xuan Phuc, President of the Philippines Rodrigo Duterte and Australia's Prime Minister Malcolm Turnbull, are crossing their arms for the traditional "ASEAN handshake" as he participates in the opening ceremony of the summit in Manila on 13 November, 2017. Photographer Jonathan Ernst: "Having covered a few ASEAN summits, I knew to expect the ASEAN handshake. Not everyone in the room knew to expect the ASEAN handshake. A lot was written about this unscripted moment, and what deeper meaning it might have. The simple truth is that sometimes in life there are unscripted moments." Reuters/Jonathan Ernst

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.