By John L. Allen Jr., CNN, and CNN Staff

Rio de Janeiro (CNN) - A small explosive device was found Sunday near a religious shrine in Brazil that Pope Francis is scheduled to visit later this week, Sao Paulo military police announced just few hours after the pope arrived on Monday.

The homemade device was found July 21, during police training in Aparecida, the site of a massive shrine to the Virgin Mary, Brazilian police said. It was constructed out of a small, plastic cylinder and duct tape.

A special tactical group detonated the explosive without causing any injuries, according to the police.

The affected area was not part of the pope's route, Brazilian police said. Rather, it was being prepared for pilgrims to World Youth Day, a weeklong Catholic event expected to draw hundreds of thousands to Brazil.

The pope is scheduled to travel to the national shrine of Our Lady of Aparecida on Wednesday. Neither Vatican nor Brazilian officials have said those plans will change.

Vatican officials say Francis requested the trip to the Marian shrine, said to be the largest in the world, because of his personal devotion to the Virgin Mary. He is scheduled to preach and celebrate Mass at the shrine.

The surprising disclosure about the explosive came just after Francis, making his first international trip since his March election, had delivered brief remarks to Brazilian dignitaries, including President Dilma Rousseff.

As the pope was driven from the airport to downtown Rio, crowds mobbed his small silver car, reaching out to touch the first Latin American pontiff. Later, they lined the streets as the "Popemobile" wound through downtown.

READ MORE: Pope Francis embarks on historic trip to Brazil

Despite the rock-star greeting, Francis kept to his remarkably self-effacing persona upon his arrival in Rio de Janeiro. The pope said he wanted to “knock gently” on Brazil’s door during his first overseas journey, making sure it was OK to proceed.

“I ask permission to come in and spend this week with you,” the pope said to his somewhat startled hosts.

Francis arrived in Rio on Monday for the start of World Youth Day, which, despite its name, is actually a weeklong gathering of Catholic youth from around the world. It was launched by the late Pope John Paul II in the mid-1980s.

In truth, it would be tough to find anyone in Brazil inclined to refuse Francis permission to enter.

Those looking forward to the papal sojourn include hundreds of thousands of pumped-up young Catholic pilgrims; a Brazilian government eager for a good news cycle after a summer of discontent; agitated Brazilian protesters, hoping for a papal blessing for their demands; and even hordes of journalists with deadlines to meet.

After touching down, Francis also offered an echo of his identity as the “pope of the poor.”

“I have neither silver nor gold,” he said, “but I bring with me the most precious thing given to me: Jesus Christ!"

The pope challenged young people to “create a world of brothers and sisters” and older generations to ensure that today’s youth have “the material and spiritual conditions for their full development,” including “safety and education” as well as “lasting values.”

MORE: PHOTOS OF POPE FRANCIS IN BRAZIL

Earlier Monday, aboard the papal plane en route to Rio, Francis worried aloud about a “throwaway culture” that neglects young people and the elderly. He said elderly persons can offer “the wisdom of life, the wisdom of the past, the wisdom of our country and our family.”

Local organizers estimated that 700,000 youth from around the world have already arrived in Rio de Janeiro to greet Francis, and some projections peg the final total at about 2 million for a youth vigil with the pope on Saturday and his concluding open-air Mass on Sunday.

Though public reaction suggests that Francis made a strong debut, the weeklong trip will have its challenges.

Latin America has long been a Catholic stronghold, but in recent years, evangelical and Pentecostal Protestants have made deep inroads.

A recent study found that a quarter-century ago, Brazil was 90% Catholic, but today it is 65%. There’s also a rising cohort of secular Latin Americans with no religious affiliation, especially among youths and city-dwellers.

Moreover, of the 21 nations usually reckoned as part of Latin America, 14 of them are led by center-left governments that have sometimes crossed swords with the region’s Catholic leaders over issues such as abortion and same-sex marriage – including in the pope’s home nation of Argentina.

Brazil has also recently been gripped by an anti-establishment mood, fueled by anger over spending on mega-events such as the 2014 soccer World Cup and the 2016 Olympics, while many ordinary people believe that services such as education, health care and transportation languish.

There’s little indication that protesters want to embarrass the pope. Instead, they seem to be hoping to take advantage of his moral authority to bring attention to their cause. This week, one group that helped kindle the massive June demonstrations has plans for a rally under the banner “Pope, look how we’re treated!”

The greater danger for Francis may be that all sides in the country’s tensions may want to spin his message their way, especially with one eye on presidential elections in Brazil scheduled for next year.

If journalists aboard the papal plane today were hoping to draw Francis into a discussion of those challenges, they came away disappointed.

Francis walked back to the press compartment shortly after takeoff and spoke for only five minutes, focusing on the risks of a “throwaway society” that neglects both its youth and its elderly.

“I don’t give interviews,” the pope said by way of explanation.

“Why, I don’t know, but I can’t … It’s a little difficult for me, but I’m grateful for your company,” he said.

Yet part of Francis’ charm is that this skittishness didn’t come off as a snub, because the pope proceeded to spend the better part of the next hour standing in the front of the economy cabin of the papal plane to personally greet each of the roughly 70 journalists on board.

Monday afternoon, Francis was scheduled to meet Brazilian President Dilma Rousseff at the Presidential Palace, and then the 76-year-old pontiff will rest on Tuesday before heading north to the famed Brazilian Marian shrine of Aparecida on Wednesday.

CNN's Barbara Arvanitidis contributed to this report.

John L. Allen Jr. is CNN’s senior Vatican analyst and a senior correspondent for the National Catholic Reporter.