Michael Flynn, the retired Army lieutenant general and former head of the Defense Intelligence Agency (DIA) whom Donald Trump has picked to be his national security adviser, is known for his long and distinguished military career, his unceremonious exit from the DIA, and for his controversial views on Islam, torture, and Russia.

Flynn, a registered Democrat, was an early and ardent supporter of Trump’s improbable presidential run, giving the Republican presidential hopeful a much-needed endorsement from the national-security establishment. He led crowds at Trump’s rallies to chant “Lock her up” about Hillary Clinton, Trump’s Democratic opponent. “Donald Trump is about the future of this country and making sure that we take a direction … that puts us back on a track that we can continue to be the global leader around the world,” he told Fox Business Network in July.

But his tenure at the DIA, as well as his remarks about Islam and torture, made Flynn a divisive figure. He might have had trouble winning Senate confirmation had Trump nominated him for a Cabinet position that requires one; the position of national security adviser does not. Flynn said he believes the Obama administration’s failure to describe the conflict with groups like ISIS as “radical Islamic terrorism” aims to “dumb us down”; said on Twitter that “we are facing violent, but very serious and cunning radical Islamists”; and, also on Twitter, called the fear of Muslims “rational.” Additionally, he once retweeted an anti-Semitic message that read “Cnn implicated. 'The USSR is to blame!' ... Not anymore, Jews. Not anymore.” He apologized and later deleted the message. Flynn has also declined to back away from Trump’s support of the waterboarding of terrorism suspects, telling Al Jazeera that he is a “believer in leaving as many options on the table right up until the last possible minute.”

Before these controversies, however, Flynn was the consummate military man. He distinguished himself during the war in Afghanistan where he was General Stanley McChrystal’s intelligence chief. In the early phases of the war on terrorism, Flynn, as director of intelligence for Joint Task Force 180, was in charge of intelligence-gathering and collection for most of the forces leading the battle against the Taliban and al-Qaeda. As Marc Ambinder noted in The Atlanticin May 2011, McChrystal and Flynn “introduced hardened commandos to basic criminal forensic techniques and then used highly advanced and still-classified technology to transform bits of information into actionable intelligence. … Such analysis helped the CIA to establish, with a high degree of probability, that Osama bin Laden and his family were hiding” in a compound in Abbottabad, Pakistan. It’s in that position Flynn also angered the U.S. defense and intelligence establishment, writing a report in which he called many intelligence analysts “ignorant,” “incurious,” and “disengaged”—assessments he stood by even when he was criticized for them.

President Obama named him head of the DIA in 2012, but he was forced out two years later, effectively over his management style. He viewed his firing as unfair and as payback for unpleasant truths he spoke about Islamist terrorism in general and the threats posed by ISIS in particular. While at the DIA, Flynn advocated an immediate overhaul of the agency—an initiative that received pushback from the intelligence community. Reuters spoke to unnamed critics of Flynn who expressed concerns “about a management style that alienated some of his subordinates at DIA.” Still, his supporters say his experience in Afghanistan and Iraq, as well as his candor, make him the right man for the position of national security adviser to Trump.

“I am, like, Mr. Change,” Flynn said in November 2010. “People that work for me know that we’re going to be innovative and, to a degree, we’re going to be uncomfortable in terms of how far we’re going to go to innovate. Because in war, if you stick with the norm, you’re going to lose.”

Flynn’s controversial views notwithstanding, he has said he is in favor of strengthening some old alliances—as well as building some new ones. He favors a hard line toward Iran, with which the U.S. and others Western nations recently signed an agreement that would freeze the Islamic republic’s nuclear program for 15 years; he supports closer ties with Abdel Fattah al-Sisi, the Egyptian president who took power after a military-backed coup toppled an Islamist-led, democratically elected government; and he backs closer ties with Israel. Additionally, in a recent op-ed in The Hill, Flynn argued the U.S. should extradite Fethullah Gulen, the Pennsylvania-based Turkish cleric who that country’s government views as a terrorist leader. Flynn did not disclose at the time that he was a paid lobbyist for the Turkish government.

Flynn also favors close relations with Russia, and prompted criticism when he showed up during the election campaign on RT, the Russian state-funded broadcaster that often serves as a propaganda arm for the Russian government. In one such appearance, he was seated near Vladimir Putin, the Russian president. Flynn has defended his appearances on RT, comparing them to CNN or MSNBC in the U.S. Both Flynn and Trump have said the U.S. needs to work more closely with Russia to combat what they see as the biggest national-security threat the U.S. faces: Islamist terrorism.

Trump “looks at people and leaders of countries and says: ‘Can I work with this guy? Do we have a common threat that we can focus on?’” Flynn told The New York Times in an interview before the elections. “He knows that when it comes to Russia or any other country, the common enemy that we all have is radical Islam.”

Flynn is likely to take on his new position with the same energy and conviction with which he carried out his previous jobs. He suggested as much in remarks last weekend after Trump’s victory. “We just went through a revolution,” he said. “This is probably the biggest election in our nation's history, since bringing on George Washington when he decided not to be a king. That’s how important this is.”