President-elect Donald Trump said Thursday he has chosen retired Marine Gen. James N. Mattis, who has said that responding to “political Islam” is the major security issue facing the United States, to be secretary of defense.

“We are going to appoint Mad Dog Mattis as our secretary of defense,” Trump told a rally in Cincinnati, the first stop on a post-election “thank-you tour.”

Trump joked that the media and audience should keep the news to themselves. “We are going to be announcing him Monday of next week,” Trump said. “Keep it inside the room.”

Mattis, who retired as chief of U.S. Central Command in 2013, has often said that Washington lacks an overall strategy in the Middle East, opting to instead handle issues in an ineffective one-by-one manner.

“Is political Islam in the best interest of the United States?” Mattis said at the Heritage Foundation in 2015, speaking about the separate challenges of the Islamic State and Iranian-backed terrorism. “I suggest the answer is no, but we need to have the discussion. If we won’t even ask the question, how do we even recognize which is our side in a fight?”

To take the job, Mattis will need Congress to pass legislation to bypass a federal law stating that defense secretaries must not have been on active duty in the previous seven years. Congress has granted a similar exemption just once, when Gen. George C. Marshall was appointed to the job in 1950.

Earlier Thursday, Jason Miller, a spokesman with the Trump transition team, tweeted that no decision had been made, but Trump’s son Donald Jr. retweeted a report saying that Mattis got the job.

Mattis, 66, served more than four decades in the Marine Corps and is known as one of the most influential military leaders of his generation, a strategic thinker who occasionally drew rebukes for his aggressive talk. Since retiring, he has served as a consultant and as a visiting fellow with the Hoover Institution, a think tank at Stanford University.

Like Trump, Mattis favors a tougher stance against U.S. adversaries abroad, especially Iran. The general, speaking at the Center for Strategic and International Studies in April, said that while security discussions often focus on terrorist groups such as the Islamic State or al-Qaeda, the Iranian regime is “the single most enduring threat to stability and peace in the Middle East.”

Mattis said the next president “is going to inherit a mess” and argued that the nuclear deal signed by the Obama administration last year may slow Iran’s ambitions to get a nuclear weapon but will not stop them. But he added that “absent a clear and present violation,” he did not see a way that Washington could go back on it, because any unilateral sanctions issued by the United States would not be as valuable if allies were not on board.

President-elect Donald Trump walks out with retired Marine Gen. James Mattis after a meeting at the Trump National Golf Club in Bedminster Township, N.J., on Nov. 19. (Jabin Botsford/The Washington Post)

“In terms of strengthening America’s global standing among European and Middle Eastern nations alike, the sense is that America has become somewhat irrelevant in the Middle East, and we certainly have the least influence in 40 years,” Mattis said.

But Mattis may break with Trump’s practice of calling out allies for not doing enough to build stability. Mattis served from November 2007 to August 2010 as the supreme allied commander of transformation for the North Atlantic Treaty Organization, focused on improving the military effectiveness of allies. Trump called NATO “obsolete” earlier this year before saying later that he was “all for NATO” but wanted all members to spend at least 2 percent of their gross domestic product on defense, a NATO goal.

“The president-elect is smart to think about putting someone as respected as Jim Mattis in this role,” said a former senior Pentagon official. “He’s a warrior, scholar and straight shooter — literally and figuratively. He speaks truth to everyone and would certainly speak truth to this new commander in chief.”

But the official, who spoke on the condition of anonymity to discuss Trump’s personnel choices, said: “If there’s any concern at all, it’s the principle of civilian control over the military. This role was never intended to be a kind of Joint Chiefs of Staff on steroids, and that’s the biggest single risk tied to Mattis. For Mattis, the biggest risk for him personally is that he will have a national security adviser in the form of Mike Flynn whose management style and extreme views may arch Mattis’s eyebrows and cause conflict over time. It’s no fun to be secretary of defense if you have to constantly feud with the White House.”

Mattis, whose nicknames include “Mad Dog” and the “Warrior Monk,” has had a leading hand in some of the U.S. military’s most significant operations in the past 20 years. As a one-star general, he led an amphibious task force of Marines that carried out a November 2001 raid in helicopters on Afghanistan’s Kandahar province, giving the Pentagon a new foothold against the Taliban after the Sept. 11, 2001, attacks. Using the call sign “Chaos,” he commanded a division of Marines during the U.S. invasion of Iraq in 2003 and returned there the following year to lead Marines in bloody street fighting in the city of Fallujah.

Mattis continued to rise through the ranks and establish his credentials as a military thinker, co-authoring the U.S. military’s new counterinsurgency manual with then-Army Lt. Gen. David H. Petraeus while Mattis was a three-star general at Quantico, Va.

He was considered a leading contender to become commandant of the Marine Corps in 2010 but was bypassed in favor of Gen. James F. Amos. Instead, Mattis replaced Petraeus as the chief of Central Command, overseeing U.S. military operations across the Middle East.

Even though Central Command did not encompass Israel, Mattis made a concerted effort to reach out to his Israeli military counterparts, according to Steven Simon, who worked with Mattis when he served on Obama’s National Security Council.

Simon, who now teaches at Amherst College, said Mattis made frequent stops in Israel during trips to the region, part of an effort to encourage the Jewish state and its Arab neighbors to work together to counter Iranian influence. “They respected Mattis because they saw him as a straight shooter and a good listener,” Simon said of the Israelis and Arabs.

The general retired from that position in 2013, about five months earlier than expected, prompting speculation that he was forced out after clashing with some in the Obama administration on Iran policy. U.S. officials denied that was the case at the time, and Mattis declined to comment.

Mattis occasionally has come under scrutiny for impolitic remarks. Most notably, he said in 2005 during a panel discussion in San Diego that “it’s fun to shoot some people” and “I like brawling,” drawing criticism from the Marine commandant at the time, Gen. Michael Hagee. But Hagee also later backed Mattis, saying the general often spoke with candor to reflect the horrors of war. Other supporters noted that he often stressed to his troops that it was important to treat civilians in a combat zone with care.

It is unclear whether the legislation required to make Mattis the Pentagon chief will be difficult to obtain from Congress. A 1947 national security law said that a general must wait 10 years from leaving active duty before becoming defense secretary. An exception was granted on a one-time basis for Marshall, with lawmakers saying in special legislation at the time that it was the “sense of the Congress that after General Marshall leaves the office of Secretary of Defense, no additional appointments of military men to that office shall be approved.”

The 10-year period was reduced to seven years in 2008 for several senior civilian defense positions, including defense secretary.

Congress could follow the model set by Marshall’s nomination to similarly waive restrictions for Mattis, and leaders may try to vote on legislation paving the way for Mattis’s nomination early next year, before Trump formally takes office. In years past, Senate committees have also held confirmation hearings for Cabinet secretaries before incoming presidents deliver their formal nominations following inauguration.

Sen. Kirsten Gillibrand (D-N.Y.), a member of the Senate Armed Services subcommittee on personnel, said Thursday night that she will oppose Mattis becoming Pentagon chief.

“While I deeply respect General Mattis’s service, I will oppose a waiver,” she said. “Civilian control of our military is a fundamental principle of American democracy, and I will not vote for an exception to this rule.”

Others, including Rep. Mac Thornberry (R.-Tex.), the chairman of the House Armed Services Committee, signaled support for the pick.

“Few individuals in the field of national security are as respected and admired as Jim Mattis,” Thornberry said. “His nomination as Secretary of Defense is an excellent selection, and I am grateful for his willingness to serve in this capacity. I will work with my colleagues in the coming days to clear the way for his confirmation by the Senate.”

Sen. John McCain (R-Ariz.), chairman of the Senate Armed Services Committee, said that he looks forward to beginning the confirmation process “as soon as possible” in the new year.

“General Mattis has a clear understanding of the many challenges facing the Department of Defense, the U.S. military, and our national security,” McCain said. “America will be fortunate to have General Mattis in its service once again.”