South Carolina Republican Sen. Lindsey Graham, a frequent foe of president-elect Donald Trump on the campaign trail, said Tuesday he will look for common ground where he can work with incoming commander in chief, including a number of defense issues.

"I am going to help him," said Graham, who on numerous occasions said he would not back or support Trump, even as his own party's nominee. "There will be areas of agreement … and in others I will speak my mind and do my job."

Graham said he is encouraged by Trump's campaign promises to boost defense spending, rework the nuclear deal with Iran and repeal military budget caps.

"Sequestration has gutted our military, and Trump is right to fix that," he said.

Graham also said he supports Trump’s promises to go after Islamic State group fighters in Iraq and Syria, although the senator warned those pledges will need to be backed up with funding.

And Graham praised two rumored picks for Trump’s Defense Secretary -- Alabama Republican Sen. Jeff Sessions and Arkansas Republican Sen. Tom Cotton -- as worthy picks he could support.

But Graham expressed concerns with Trump’s past comments on Russia, vowing that the Senate "will not give up on Crimea" and promising to push the administration to fight Russian aggression.

He also said he will not support some immigration policies that Trump has suggested, and predicted that foreign adversaries will likely test Trump in his early days as president.

"And I will support him, because he is commander in chief at dangerous times," he said.

Graham and Senate Armed Services Committee Chairman John McCain, R-Ariz., are seen as pivotal figures for a Trump administration, because of their party stature on defense issues and fractured relationship with the incoming president.

Both men openly fought with Trump over the last year, and were ridiculed by the reality TV star turned politician on the campaign trail. Last summer, in separate incidents, Trump mocked McCain for being captured as a prisoner of war during Vietnam and encouraged supporters to harass Graham after giving out his cell phone number at a press conference.

Graham reiterated that Trump was not his pick for president, but said he sees areas of building a professional working relationship. He also dismissed critics’ claims that Trump officials will marginalize and ignore his opponents on Capitol Hill.

"The last time I looked, they’ve still got to come to Congress," he said.

Leo Shane III covers Congress, Veterans Affairs and the White House for Military Times. He can be reached at lshane@militarytimes.com .