Leaders from around the world, as well as former U.S. presidents, offered their condolences to the victims of the harrowing terror attack in New York on Tuesday with many of them sending warm messages and words of encouragement through social media.

The outpouring of global support came just hours after a man, identified by authorities as Sayfullo Saipov, killed eight people and injured more than a dozen others in a horrific truck-ramming attack on Tuesday afternoon.

The suspect, a 29-year-old from Tampa, Florida, was taken into custody at the scene and is reported to have shouted "Allahu Akbar," or "God is Great" in Arabic.

President Donald Trump declared the incident an act of terror in a tweet on Tuesday and ordered the Department of Homeland Security "to step up our already Extreme Vetting Program."

“My thoughts, condolences and prayers to the victims and families of the New York City terrorist attack. God and your country are with you,” Trump tweeted.

Leaders from around the world promised to renew efforts to defeat terrorism in the wake of the deadly attack.

“Appalled by this cowardly attack, my thoughts are with all affected,” British Prime Minister Theresa May said in a tweet. “Together we will defeat the evil of terrorism. UK stands with #NYC.”

Argentinian President Mauricio Macri also reacted to the attack on Twitter, saying in Spanish that he was "deeply moved by the tragic deaths in NY." Five of the victims of the attack were from Argentina, and Macri said his country was "at the disposal of the families of those killed."

Here’s a look at how other world leaders reacted to the attack.

Former U.S. President Barack Obama

Former U.S. President Bill Clinton

France President Emmanuel Macron

Malaysia Prime Minister Mohd Najib Tun Razak

NATO Secretary General Jens Stoltenberg

European Council President Donald Tusk

Danish Prime Minister Lars Lokke Rasmussen

The government of Montenegro