The church was built in 1611, near the former Porta Gervasona in the medieval walls of the city. The church was built near the site of a miracle. In 1608, a young man and his horse fell into the riverMarecchia near a tower at the site, with stairs leading to the bank. He prayed for help from an icon of the virgin that had been painted on the tower. His rescue led to veneration of the icon by sailors. The icon, painted by the localpainter Alessandro Codrini in 1608, became a source of veneration for sailors; it has been restored over the centuries. The church was refurbished in 1717.