As leaders from the Group of 7 nations gather this week in southern Italy, they will be joined by representatives from countries at the center of international conflict, from developing nations like Brazil and India, and, for the first time, from the Holy See.

Pope Francis, the Vatican announced, will take part in a discussion on Friday on the ethical implications of artificial intelligence at a session that is open to envoys from countries that are not G7 members. The Vatican said Pope Francis would also have bilateral conversations with some of the visiting leaders, including President Biden and Turkey’s Recep Tayyip Erdogan.

Prime Minister Giorgia Meloni of Italy, who invited him, said the pope’s presence would “make a decisive contribution to defining a regulatory, ethical and cultural framework” for A.I., adding that his participation “brings prestige to our nation and to the entire Group of 7.”

Francis’s participation in the summit comes as the 87-year-old pope was reported this week to have used again an offensive slur to refer to homosexuality, the same pejorative he was accused of using last month. The reports last month prompted a backlash among L.G.B.T.Q. people, toward which the pope had generally adopted a more welcoming approach.

The pope’s G7 presence breaks with a long tradition in the Roman Catholic Church of refusing such invitations on the basis that a pontiff does not need state leaders or anyone else to offer him a platform to speak, said Alberto Melloni, an Italian church historian.

“The pope already has the floor,” Mr. Melloni said.

But in this case, Pope Francis, who has a record of breaking with conventional behavior, might see the summit as a high-profile opportunity to send another loud message on ending conflicts such as the wars in Ukraine and Gaza, Mr. Melloni said.