The Senate confirmed President Biden's nominee for undersecretary of defense for policy, Colin Kahl, Tuesday evening after a party-line 49-45 vote.

Kahl's confirmation process was yet another one mired in controversy, as he was scrutinized not just for his professional record but for his anti-Republican social media posts. In October 2019, he tweeted that Republicans "debase themselves at the alter of Trump" and "are the party of ethnic cleansing."

BIDEN PENTAGON PICK FACES QUESTIONS OVER TIES TO GROUP THAT HELPED CREATE IRAN DEAL 'ECHO CHAMBER'

"The last few years have been pretty polarizing on social media and I'm sure there are times that I got swept up in that," Kahl admitted during his confirmation hearing.

Another example of anti-Republican hyperbole was when Kahl said "we are going to die" if John Bolton were to become national security adviser, which he eventually did.

Besides his past tweets, Republicans opposed Kahl due to the substance of his policy positions, particularly regarding Iran and the Middle East. Kahl, who served as Biden's national security adviser during the Obama administration, supported the Iran nuclear deal and has since been criticized for his ties to a progressive group called the Plougshares Fund that played a key role in crafting a narrative to sell the deal to the American public. He also gave dire warnings regarding Trump administration actions, predicting consequences that never came to be.

Sen. Jim Inhofe, R-Okla., listed a number of Kahl's wrong predictions, including one regarding the killing of Iranian major general Qasem Soleimani.

"[Y]ou said that ending the Iran deal might lead to war, and that did not happen," Inhofe said. "You said the Soleimani strike would force the United States out of Iraq. That did not happen. You wrote that it would be "difficult" to prevent a "massive war" on the Korean peninsula in 2018. That did not happen. You said that moving the U.S. Embassy to Jerusalem would harm relations with Arab states, and, in fact, Arab-Israeli relations have never been better."

GOP SENATORS WANT FBI TO PROBE IF BIDEN PENTAGON NOMINEE DISCLOSED CLASSIFIED INFO AFTER LEAVING OBAMA ADMIN

Regarding Soleimani, Kahl admitted at his hearing that the world "probably is a better place without him." As for the state of the Middle East following the move of the embassy in Israel to Jerusalem, Kahl stated that he believes "dynamics in the Middle East have changed" and that he "would not move the embassy back to Jerusalem." Kahl recognized the Abraham Accords, the recent peace deals between Israel and several Arab nations, and said he supports them.

Sen. Tom Cotton, R-Ark., said at the hearing that when Kahl worked in Middle East policy for the Pentagon, he did not anticipate the rise of ISIS.

"Dr. Kahl, it seems to me that your judgments about matters of war and peace are almost always wrong," Cotton said.

CLICK HERE FOR THE FOX NEWS APP

Earlier this month, a group of Senate Republicans asked FBI Director Christopher Wray to investigate whether Kahl disclosed classified information on social media after leaving the Obama administration.

"I have never publicly shared information I knew to be classified and take my obligations to protect classified information seriously," Kahl wrote in response to the allegations.

Fox News' Evie Fordham, Danielle Wallace and Tyler Olson contributed to this report.