Madrid authorities said more than 500,000 people gathered for the pope's visit as he started off his first papal visit to Spain.