Pope Francis warned the G7 leaders of the danger of artificial intelligence and called for a ban on autonomous weapons.
He had previously loaded up for the meeting by meeting over a hundred comedians at a lighthearted audience in the Vatican.
Francis made history on Friday as the first pope to visit and speak at a G7 meeting, currently taking place in south-eastern Italy.
He took the opportunity to urge the world's most powerful economies to ban self-governing robots and other lethal autonomous weapons. He also asked them to proceed with caution when it comes to AI technology, which he described as a "both exciting and frightening" tool.
We would be condemning humanity to a future without hope if we took away people's ability to make their own decisions about their own lives, said the Pope about the threat from AI.
Just a few hours earlier, Francis had a very different audience. Over a hundred comedians from around the world had been granted an audience at the Vatican to celebrate the power of laughter.
Among the comedians were well-known entertainers such as Whoopi Goldberg, Jimmy Fallon, Chris Rock, Stephen Colbert, and Conan O'Brien.
You bring people together, for laughter is contagious, said the Pope, thanking them for spreading joy in a gloomy time in the world.
He assured the comedians that it was okay to joke about God, "just as we joke with those we love".
Remember that if you can just get one person to laugh, you also get God to laugh.
The comedians were all delighted after the visit, which Whoopi Goldberg described as "fantastic, fast-paced, and loving". Even if not everyone understood what the Pope said.
I don't speak Italian, so I'm not entirely sure what he said, joked talk show host Conan O'Brien.