WASHINGTON — For the United States, it was simple retaliation: Rebels in Yemen had fired missiles at an American warship twice in four days, and so the United States hit back, destroying rebel radar facilities with missiles.

But for the rebels and many others in Yemen, the predawn strikes on Thursday were just the first public evidence of what they have long believed: that the United States has been waging an extended campaign in the country, the hidden hand behind Saudi Arabia’s punishing air war.

For the Obama administration, the missile strikes also highlighted the risks of a balancing strategy it has tried to pursue in Yemen since a bitter sectarian war engulfed the country two years ago. The United States has not formally joined the Saudi-led coalition that intervened in support of Yemen’s deposed government — and has tried to push the warring factions toward a peace deal — but it has refueled coalition bombers, trained Saudi pilots and provided intelligence to the bombing campaign.

A year and a half of bombing — along with the deaths of thousands of Yemeni civilians — has stoked anger in Yemen not only toward the Saudis, but also toward their perceived patrons in Washington. This week’s attacks on the Mason, an American destroyer, and the Pentagon’s response show how rapidly the United States can go from being an uneasy supporting player to an active participant in a chaotic civil war.