He also said that the US will do whatever is necessary to help Spain.
"The United States condemns the terror attack in Barcelona, Spain, and will do whatever is necessary to help. Be tough and strong, we love you!" Trump said in a tweet.
An advisory has also been issued to American citizens in the area to stay in touch with their "loved ones".
"We offer our condolences to the loss of life and the injuries that have occurred to so many innocent people yet again. We will continue to monitor the situation. We stand ready to assist law enforcement and national security authorities in Spain," US Secretary of State Rex Tillerson told reporters at a joint news conference with the Defence Secretary and their Japanese counterparts.
More From This Section
"We ask US citizens in the area to let your loved ones know you are safe. Terrorists around the world should know the United States and our allies are resolved to find you and bring you to justice," he said.
The Department of Homeland Security said it has reached out to Spanish authorities, and is standing by to support them.
"We will not let terrorism become the new normal. Instead, such acts of violence only harden our resolve to fight back against violent extremists, bring them to justice, and dismantle their networks," it said in a statement.