— -- Ensuring the security of a world dignitary can be a huge logistical challenge, but when that dignitary also loves to mingle with the crowds, and the crowds clamor to be near to him -- as with Pope Francis -- the challenge gets even more complicated.
That's why top officials at the U.S. Secret Service, including Director Joseph Clancy, traveled to Italy in June to prepare for Pope Francis' upcoming visit to the United States.
Secret Service agents in charge of the pope’s security detail met with the head of Vatican security, both in Rome and in the United States to discuss details of the trip.
“I went out to Rome to see firsthand how their detail works, protecting the pope and what he likes to do and how he travels within the crowds,” said Clancy in an interview with ABC News' Senior Justice Correspondent Pierre Thomas at the Secret Service Rowley Training Center.
Pope Francis, who has been traveling throughout South America this month, is set to arrive in the U.S. from Cuba in late September. While in the U.S. he is scheduled to travel to Washington, D.C., New York and Philadelphia. He has several masses planned, as well as meetings with President Obama and an address to a joint session of Congress.
The pontiff's visit, which coincides with the U.N. General Assembly meeting, presents a “tremendous challenge,” Clancy said.
“He loves to be out with the people,” he said.
Francis has become known for mingling with and shaking hands of people in the crowds that amass for his public appearances.
During his South American trip, Francis has used an unarmored car and was seen with his window rolled down in Bolivia. Tens of thousands of Bolivians gathered today for the pope’s first public Mass in the country.
The Secret Service has been watching closely as the pope travels throughout South America to see how the interacts with crowds.
“Each protectee is different, whether it's presidents or certainly the pope and we have to adapt to some of the things that they want to accomplish,” Clancy said.
Pope Francis has already drawn record-breaking crowds. The largest ever papal event took place in Manila, Philippines, in January, where millions of people came out for an open-air Mass.
Clancy said the Secret Service is also working with its partners within the Department of Homeland Security, as well as local and federal law enforcement to ensure a safe visit.
“We expect large crowds for the people and we're prepared for that,” he said.
ABC News' Phoebe Natanson contributed to this report.