Updated

Pope Benedict XVI urged Italy on Sunday to welcome immigrants fleeing to its shores, invoking the historic role of Venice and the once influential church in nearby Aquileia as a cultural bridges during his two-day visit to northern Italy.

"The churches created by Aquileia are called today to renew that ancient spiritual unity, in particular in light of the phenomenon of immigration and the new geopolitical circumstances," Benedict said during his homily to more than 300,000 worshippers gathered in a vast park on the Venetian mainland.

Italy has been struggling to cope with thousands of illegal migrants that have reached its shores in recent months often in rickety boats as they flee unrest spreading through northern Africa. On Sunday, about 400 were rescued when their boat crashed against rocks at the port of Lampedusa, Italy's closest port.

The pope's message of tolerance for immigrants appeared especially pointed as the visit takes place in the region of Veneto, one of the strongholds of the anti-immigration Northern League, although Venice itself has long been run by center-left administrations.

The open-air Mass was the spiritual highlight of Benedict's two-day visit, the first by a pope to Venice since his predecessor John Paul II plied the canals in a gondola styled for Venice's long-ago rulers.

Benedict too glided across the mouth of the Grand Canal in the same gondola, the Dogaressa, piloted by four gondolieri in white outfits and golden sashes. The pope chatted quietly with Venice Cardinal Angelo Scola on the short journey, removing his white skull cap to prevent it from blowing away in the wind.

He was greeted with warm applause at the Our Lady of Good Health Basilica, where he met with cultural, artistic and economic leaders.

Earlier during the Mass, Benedict spoke from beneath a huge dome constructed in the likeness of St. Mark's Basilica, replete with images of its golden mosaics of saints printed on cloth. Gold-laced crystal chalices handcrafted by glassblowers of the Venetian island of Murano were offered for use during the service.

Benedict greeted worshippers from his popemobile as he arrived for Mass, stopping briefly to kiss a swaddled infant who was passed to him from the crowd.

His visit started Saturday in Aquileia, a former Roman port city where the Patriarchal Basilica was erected during the Middle Ages. Aquileia became one of the most influential dioceses of the era, establishing churches from present-day Hungary to Germany and northwestern Italy and uniting Latin culture with Germanic and Slavic peoples.

From Aquileia, Benedict traveled to St. Mark's Square, the heart of Venice, a city which for ages was the cultural crossroads between the East and West thanks to its strong merchant class. He was greeted by around 25,000 well-wishers as he toured the arcade-lined square in an electric vehicle.

Benedict returned after Sunday Mass to Venice's historic center for lunch, followed by an assembly of bishops at St. Mark's Basilica.

The visit was held under tight security, with helicopters flying overhead during the Mass and the pope flanked by his personal security corps. Most traffic in the area of the Mass was blocked, but worshippers were not required to go through metal detectors or have their bags checked as they streamed into the park.