Updated

President-elect Donald Trump has chosen retired Marine Gen. John Kelly, whose last command included oversight of the Guantanamo Bay detention center, to run the Department of Homeland Security, people close to the transition team said Wednesday.

Kelly, who joined the Marine Corps in 1970, retired earlier this year, wrapping up a final, three-year post as head of U.S. Southern Command, which spanned some of the more fractious debate over the Obama administration's ultimately failed pledge to close Guantanamo.

He served three tours in Iraq, and holds the somber distinction of being the most senior military officer to lose a child in combat in Iraq or Afghanistan. His son, Marine 2nd Lt. Robert Kelly was killed in November, 2010, in Helmand Province, Afghanistan.

Highly respected, often outspoken, and known as a fierce, loyal commander, Kelly will take over the nation's newest federal agency, with responsibilities from airport security and terrorism to immigration and the Coast Guard. The department was formed after the Sept. 11 terror attacks in an effort to get the U.S. government better-positioned to prevent and respond to future attacks.

If confirmed by the Senate, Kelly would be the fifth person to lead the department, which is comprised of agencies that protect the president, respond to disasters, enforce immigration laws, protect the nation's coastlines and secure air travel.

His selection, however, also bolsters concerns about an increase in military influence in U.S. policy in a Trump White House. And it raises the scepter of militarization along the border, as Trump moves forward on his signature issue of immigration and his promise to build a wall along the southern border and go after people living in the country illegally.

Transition officials confirmed Trump's pick of Kelly on condition of anonymity because they weren't authorized to speak publicly before any official announcement.

In Kelly, Trump would have another four-star military officer for his administration. James Mattis, a retired four-star Army general, is Trump's pick for defense secretary.

Immigration enforcement is a familiar issue for Kelly. Southern Command, which is based in South Florida, regularly works with DHS on missions to identify and dismantle immigrant smuggling networks. And it has partnered with Immigration and Customs Enforcement in an operation targeting human smuggling into the U.S. and helped with the rescue of children arriving alone at U.S. borders.

The department has struggled with its identity, trying to balance its ties with the military and maintain its role as a civilian law enforcement agency. Customs and Border Protection — which includes the Border Patrol — and the Coast Guard routinely partner with Southern Command to coordinate drug smuggling investigations in the Caribbean.

If immigration enforcement is prioritized the way Trump promised during his presidential campaign, the department will be challenged with beefing up the screening of immigrants allowed to come into the U.S., and finding additional resources to track down and deport people living in America illegally. It will also need to find a place to house these immigrants while they're waiting for deportation.

Scraping for federal funds and equipment to battle such problems will not be a new challenge for Kelly. As the head of Southern Command, he was often blunt about his need for more resources to fight the drug trade that sweeps into the U.S. from South America.

During a 2014 hearing, he told the Senate Armed Services Committee that he didn't have the ships or surveillance assets to get more than 20 percent of the drugs leaving Colombia for the U.S. He said he often had "very good clarity" on the drug traffickers, but much of the time "''I simply sit and watch it go by."

The most contentious issue Kelly faced, however, was the Obama push to close the Guantanamo Bay, Cuba, detention center, and proposals to bring detainees to a facility in the U.S. if they could not be returned to other nations. Members of Congress stridently opposed any move to close Guantanamo, arguing that it is the ideal location for terror suspects gathered up in the aftermath of the 9/11 attacks.

The Pentagon faced criticism for not moving more quickly to release detainees to other countries. Those decisions largely rested with the defense secretary, but Kelly absorbed some of that anger even though his job was simply to carry out the transportation of the detainee after the decision was made. He also raised concerns about the costs of moving the detention center to the U.S., including for the expanse of security that would be needed for the facility.

By the time he left the Southern Command job, there were fewer than 100 detainees at the center, compared with 680 at its peak in 2003, and 245 when Obama took office.

In his final Pentagon press conference in January, Kelly waded into a number of hotbed issues, including the Marine Corps' initial opposition to putting women in combat jobs. He said his biggest concern was that there would be pressure to lower standards because that may be the only way it could work in the years ahead.

He then spoke openly about the loss of his son — a topic he didn't often raise in a public setting.

"To lose a child is — I can't imagine anything worse than that. I used to think, when I'd go to all of my trips up to Bethesda, Walter Reed, I'll go to the funerals with the secretaries of defense, that I could somehow imagine what it would be like," said Kelly. "I lost a father, I lost a mother. So you kind of think it's something like that, but it's not. It's nothing like that."

But, he added, "when you lose one in combat, there's a — in my opinion — there's a pride that goes with it, that he didn't have to be there doing what he was doing. He wanted to be there. He volunteered."

Kelly said he gets "occasional letters from gold star families who are asking, 'Was it worth it?' And I always go back with this: It doesn't matter. That's not our question to ask as parents. That young person thought it was worth it, and that's the only opinion that counts."

__

AP writers Eileen Sullivan and Alicia A. Caldwell contributed to this report.