Why did Trump decide to attack Syria? Just turn on your TV.

Just days before the New Hampshire primary last year, a must-win contest to keep his unlikely bid for the presidency alive, Donald Trump was doubling down on his opposition to admitting refugees from Syria and other countries known to be breeding grounds for terrorists when a supporter stood up and questioned how committed he really was to that pledge.

Speaking at a town hall in Salem, N.H., the man asked if Trump could really look at Syrian children “aged 5, 8, 10, in the face” and say they couldn’t come to the U.S. Trump said he could.

Slideshow: Suspected Syria gas attack kills dozens, including children >>>

“I can look in their faces and say, ‘You can’t come here,’” he announced to cheers, arguing, as he would repeatedly throughout the campaign, that Syrian children could be used by their parents as a “Trojan horse” to get into the country to help perpetrate attacks on the homeland.

A little over a year later, there’s no sign that Trump has weakened his stance on keeping Syrian refugees out of the United States. His temporary ban blocking refugees from six Muslim-majority countries is on hold, blocked by a federal court amid arguments over its legality under the Constitution. But his posture on the subject of Syrians, especially children caught up in the ongoing civil war there, has changed remarkably in the aftermath of what U.S. officials say was a poison gas attack launched by Syrian President Bashar Assad on his own people.

Slideshow: U.S. attacks Syrian air base >>>

The images, which have blanketed cable TV and other news outlets, were horrific even for a public desensitized by the seemingly endless drumbeat of death in Syria’s multi-sided civil war. Dozens of unconscious children, their tiny, limp bodies being hosed down with water in the street as doctors frantically tried to revive them. A hospital ward packed with young kids, many foaming at the mouth, their small chests heaving up and down as they struggled to breathe. A stunned father clutching his lifeless 9-month-old twins, wrapped in white blankets, as he tearfully rocked them one last time. “Say goodbye, baby, say goodbye,” the man said, a dead child in each arm, in footage that made news around the world.

It was an atrocity that, to the surprise of nearly everyone, prompted Trump to order retaliatory missile strikes against Syrian targets on Thursday night in what is likely to go down as a key moment in his young presidency.

Speaking to reporters at Mar-a-Lago, his Florida estate where he was hosting Chinese President Xi Jinping, Trump somberly framed his move as an act of deterrence, aimed at discouraging the spread and use of chemical weapons that could undermine America’s security. But it was also clearly an emotional decision made by a president who has often spoken of relying on gut instinct, whether in his business deals, as a reality television star or in his surprising political career.

After months of campaigning on his “America First” policy and arguing that the U.S. should focus on problems at home before intervening elsewhere, Trump abruptly shifted his stance, taking aim at Assad — only days after his administration had seemingly backed away from a longstanding American commitment to deposing him as a precondition for peace.

Assad, Trump said Thursday, had “choked out the lives of helpless men, women and children” in what was a “slow and barbaric death for so many.” “Even beautiful babies were cruelly murdered,” Trump declared. “No child of God should ever suffer such horror.”

(Photo illustration: Yahoo News; photos: Yuri Gripas/Reuters, Alaa Alyousef via AP)
Photo illustration: Yahoo News; photos: Yuri Gripas/Reuters, Alaa Alyousef via AP

Though many of Trump’s critics were quick to praise his move against Syria, they also pointed out that it was a position deeply tinged with irony. Trump was suddenly coming to the defense of Syrian civilians that he had spent most of his presidential campaign decrying as potential terrorists, people he had spent much of his early presidency trying to keep out of the country.

Only Trump can say for certain what prompted his decision to plunge into a messy conflict for which there are few easy solutions. He would hardly be the first president to reconsider his views after assuming the responsibilities that come with taking a role on the world stage where America is viewed as a leader of democracy.

But one important lens for viewing Trump as president is television, which he watches obsessively. And not unlike the coverage of his administration on cable TV that has sent him to rage on Twitter, footage of the atrocities produced in Trump — as in many Americans — a visceral reaction.

Speaking at a press conference at the White House on Tuesday, Trump admitted as much, telling reporters that his attitude toward Syria and Assad “had changed very much” because of the footage he’d seen. “I will tell you that attack on children yesterday had a big impact on me, big impact,” he said. “That was a horrible, horrible thing. And I’ve been watching it and seeing it, and it doesn’t get any worse than that.”

Using a phrase he would repeat on Thursday, Trump spoke of the “beautiful little babies” that had been killed. “It crossed a lot of lines for me. When you kill innocent children, innocent babies, little babies with a chemical gas that is so lethal… that crosses many, many lines. Beyond a red line, many, many lines,” he said.

That leaves at least two significant, unanswered questions for the future: Will Trump continue to make policy based on television footage that tugs at his heart? And what does this portend about Trump’s attitude toward refugees fleeing precisely these kinds of atrocities? The White House has dodged questions about whether Trump’s change of heart on intervening in Syria means the president has also shifted his view on refugees. Speaking to reporters Thursday night, Gen. H.R. McMaster, Trump’s national security adviser, said the refugee ban hadn’t come up in the context of Thursday’s military strike.

Read more from Yahoo News: