Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Acting Secretary of Defense Patrick Shanahan clashed with Sen. Lindsey Graham over the administration’s Syria policy during a briefing last weekend, prompting Graham to unleash a string of expletives and declare himself Shanahan's "adversary," according to two officials in the briefing and three others familiar with the conversation.

The contentious briefing on the sidelines of the Munich Security Conference rankled the bipartisan group of lawmakers and cast doubt over Shanahan's chances of being confirmed if President Donald Trump nominates him to permanently lead the Pentagon, the officials said.

The episode highlighted Shanahan’s increasingly strained relationship with Capitol Hill two months after his predecessor, Jim Mattis, stepped down.

"He lost my confidence," one lawmaker said of Shanahan.

The briefing turned heated as Graham, a South Carolina Republican, pressed Shanahan about the president's decision to withdraw all U.S. troops from Syria, according to the five officials.

Shanahan tried to ease the concerns of the group of senators and House members by stressing that the military will keep troops in the region and will be prepared to combat a possible ISIS resurgence after the drawdown's scheduled completion by the end of April, the five officials said.

But Shanahan's talking-points approach to the briefing only frustrated the lawmakers, prompting Graham to unleash expletives in a sharp exchange with Shanahan, according to the officials.

Tensions escalated after Graham pointedly asked Shanahan for his opinion on Trump's decision to leave Syria, and the acting secretary refused to condemn it. Raising his voice, Graham finally told Shanahan he should consider him "an adversary," according to the officials.

Shanahan shot back at Graham, asking if he has any more questions "as an adversary."

"It got pretty tense," recalled one official in the room.

Another person familiar with the exchange said: "It was heated, particularly on Graham's side."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A U.S. defense official described the outcome differently, conceding that the exchange was heated, but said that the acting secretary of defense was ultimately able to reassure the members.

"They discussed a broad range of issues and the meeting ended on a positive note," the official said.

Graham did not return a request for comment.

Shanahan was asked about the incident in an appearance at the Pentagon the day after NBC News reported on the briefing. "I always think of Senator Graham as an ally and we have shared interests," Shanahan said Thursday. "He is a problem solver and I’m very confident we'll come together with a solution for Syria."

Shanahan is among several candidates under consideration to helm the Pentagon, including Air Force Secretary Heather Wilson, Secretary of State Mike Pompeo, and Army Secretary Mark Esper, according to multiple people familiar with the matter.

Following the briefing in Munich, some members of Congress openly expressed disapproval for Shanahan to get the nomination.

"He is probably very good at securing government contracts, but it's debatable whether he knows about the military," said Rep. John Garamendi, D-Calif., who serves on the House Armed Services Committee. He said Shanahan does not understand the oversight, appropriations or policy roles of Congress.

A staunch Trump ally on most issues, Graham has been a critic of the president's decision to pull all troops out of Syria. Even as Trump has expanded the time frame for withdrawal — from 30 days to several months — Graham has continued to oppose the policy.

Graham, as a longtime leading figure in the Senate on foreign policy and national security, is an influential voice in nominations for positions like defense secretary. He was a strong supporter of Mattis, who resigned as defense secretary after the Syria withdrawal announcement.

Shanahan, who was Mattis' deputy, has been auditioning since January to replace him.

"Shanahan is just trying hard to do whatever Trump tells him," said one person familiar with the briefing last weekend. "He's going to do everything he can to appease the president."

The president's decision to withdraw troops from Syria has faced strong resistance since it was announced on Dec. 19.

Last week Gen. Joseph Votel, the commander of U.S. Central Command, told the Senate Armed Services Committee that while he knew about the president's overall desire to leave Syria, he was not in the loop about the announcement. "I was not consulted," Votel said.

The relationship between the Pentagon and Congress has been strained in recent weeks.

On Jan. 30, during a classified briefing on another matter, one Democratic congressman scolded a group of senior Pentagon officials for lack of transparency about decisions including sending U.S. troops to the border with Mexico.

The briefing came one day after two senior Pentagon officials appeared before the House Armed Services Committee to testify about the border mission but never mentioned a decision to deploy thousands more active duty troops to the border.

"You have betrayed this committee's trust," a senior member of the committee said to the officials, Lt. Gen. Richard Clarke, the Joint Staff director for strategic plans and policy, and the undersecretary of defense for policy, John Rood, according to a senior congressional staff member.

"It will take years to repair the trust that you've lost," the lawmaker added.

That same week, the committee's chairman, Rep. Adam Smith, D-Wash., sent a scathing letter to Shanahan, criticizing Rood for not disclosing the plan to send more troops to the border.

"At best this was an error in judgement, at worst this was knowingly withholding information from this committee as it performs its oversight responsibility," Smith wrote.