The last pope to visit the Philippines was the target of militants whose plot was uncovered days before his arrival. The one before that was wounded by an attacker who posed as a priest to get close to him.

And now Pope Francis, a man with a penchant for breaking out of security cordons to meet ecstatic crowds, is giving Philippine authorities daunting security challenges beginning with his arrival Thursday and topped by an outdoor Mass on Sunday that could draw a record 6 million people.

Another tough job: Francis' trip Saturday to cheer survivors of a devastating 2013 typhoon in a central region where Marxist guerrillas have a presence.

A look at the challenges:

___

CROWD CONTROL

The Philippine government will deploy up to 50,000 police and troops — nearly a fourth of its forces — to ward off any threat, keep ecstatic crowds from mobbing the pontiff and prevent stampedes and crimes. State forces are thinly spread even under normal circumstances as they deal with communist and Muslim insurgents and other threats.

To keep crowds from blocking his popemobile, concrete barriers topped by iron fencing have been laid out along the 11-kilometer-long (6.8-mile-long) route from the air base where the pontiff's plane will touch down to the Apostolic Nunciature in Manila, where he will stay.

Police officers will stand guard near the barriers, facing the crowd. They have been warned not to abandon their posts to get a closer look at the pontiff, as some officers did in past papal visits. Thousands of church volunteers will help maintain order.

Security officials have discouraged well-wishers from bringing backpacks, recommending that they carry belongings in transparent bags so inspectors can check them more quickly.

Restrictions have been placed on travel by air, land and sea. Many international and domestic flights have been rescheduled because of planned hours-long airport closures in Manila and central Tacloban city while the pope's plane is arriving or taking off. Many motorists will be inconvenienced by a parking ban near Roxas Boulevard, which the pope will use frequently, and fishermen will be kept away from water they normally ply in nearby Manila Bay.

___

NO SPECIFIC THREATS

President Benigno Aquino III, who has helped supervise security preparations, said no specific threat against the pope has been detected. A confidential government threats assessment report obtained by The Associated Press lists eight mostly Muslim extremist groups in the country and abroad as potential dangers, including local Abu Sayyaf militants, al-Qaida and the Islamic State group, which has threatened the pope.

"Jihadist groups coming from within and without pose the most significant threat to the pope," according to the report.

The roster of potential troublemakers listed in the report includes "lone wolves," self-radicalized jihadis who might plot attacks on their own. The report said intelligence monitoring has been intensified to thwart potential dangers.

___

CROWD-ADORING POPE

Pope Francis' habit of breaking out of his security cordon to embrace and chat with well-wishers presents a dilemma to security forces. Francis' trip is both a state visit by the Vatican head of state and an apostolic journey by the leader of the 1.2 billion-strong Catholic church, who wants to connect with his flock. The church and the government agree that authorities must strike a balance between protecting Francis and ensuring that security won't get in the way of his outreach.

"We appreciate this concern for the security," Manila Archbishop Cardinal Luis Antonio Tagle told the AP in an interview. But he added, "We don't want to bring him here only to isolate him from the people."

___

FOILED PAST ATTACKS

Pope Paul VI was slightly wounded at the Manila airport in 1970 by a dagger-wielding Bolivian painter disguised as a priest. A week before a 1995 visit by Pope John Paul II, Philippine authorities said they uncovered a plot to kill the pontiff by militants led by Ramzi Yousef, the convicted mastermind of the 1993 World Trade Center bombing. Yousef's group stayed in an apartment building about a block away from the Apostolic Nunciature before authorities discovered the terrorist hideout.