Both have wished the Republican candidate a speedy recovery after he was hit in the right ear.
A spectator was killed in the attack and two other people were wounded.
“I follow with apprehension the updates from Pennsylvania, where the 45th President of the United States Donald Trump was shot during a rally,” Meloni said on social media overnight.
“[I send] my solidarity and my wishes for a speedy recovery to him, with the hope that the coming months of the election campaign may see dialogue and responsibility prevail over hatred and violence.
“There are limits that should never be crossed in political debate, all over the world,” Meloni added.
“It is a warning to everyone, regardless of political affiliation, to restore dignity and honour to politics, against all forms of hatred and violence, for the sake of our democracies.
“Solidarity with Donald Trump, his supporters and the injured, and my heartfelt condolences to the victim’s family.”
Mattarella said the attack was cause for “grave alarm and strong indignation”.
“The violence that, for some time now, has resumed in the political arena is a disconcerting symptom of the deterioration of the civil fabric and the dangerous rejection of discussion, dialogue and respect for democratic life,” the Italian head of State added in a statement on Sunday.
“I wish Donald Trump and the others injured a speedy recovery and express my condolences for the citizen who has fallen victim to this intolerable act of hatred and an attack on freedom.
“The United States, a great democracy, will certainly respond effectively and vigorously to any concept of violence.”
Deputy Prime Minister and Foreign Minister Antonio Tajani said he was “shocked by the coming images from Pennsylvania”.
“I reiterate, one again today, our deep closeness to the United States and condemn the violence that has no place in democratic debate,” Tajani said.
“I am following the developments and am in contact with the Italian Embassy in the United States.
“I wish the 45th President of the United States Donald Trump a speedy recovery.”
Italy’s opposition parties joined the condemnation.
“Political violence must have no place within our democracies,” said centre-left Democratic Party (PD) leader Elly Schlein.
“We said this when there were other attacks on politicians in Europe in recent months, and we reiterate it clearly today after what happened in the USA.
“Those who care about democracy everywhere, in the United States and elsewhere, must now firmly oppose all forms of hate speech and political violence.”
The 5-Star Movement (M5S) expressed “maximum solidarity” for Trump via a statement by its Lower House and Senate whips, Francesco Silvestri and Stefano Patuanelli.
Meanwhile, Deputy Prime Minister and Transport Minister Matteo Salvini on Sunday linked the assassination attempt to allegedly “violent tones” by figures on the Left of the political spectrum.
“Certain violent tones by the Left risk arming the hands of the weak-minded,” Salvini, the leader of the right-wing League party, said via social media.
“It happened in the USA, it had also happened in Italy against [Silvio] Berlusconi,” he added, referring to a 2009 attack on the late Italian ex-PM.
“I hope it won’t happen again.”
The post featured a link to an interview with Rai television in which he said, “I hope that this serves [as a lesson] to those who sow words of hate against right-wingers, fascists, racists, against Trump, Bolsonaro, Fico or other figures.”
Several opposition politicians accused Salvini of trying to make use of the assassination attempt for political gain.
“Salvini lashes out against those who criticise racism and fascism, turning reality on its head, yet the person who shot Trump was a right-wing, pro-gun militant,” said Democratic Party Senator Enza Rando.
“The attack on Trump is a very serious incident.
“It would be better to remain silent, rather than exploit it.”
ANSA