BEIRUT, Lebanon — A prominent anti-government activist in Syria who used biting wit to draw international attention to his country’s plight was shot dead by unidentified gunmen in his hometown on Friday, his friends said.

The activist, Raed Fares, used videos, skits and protest placards that referenced American culture and often went viral on social media to criticize the Syrian military, jihadists and Western leaders he felt had failed to stop the violence that tore his country apart.

The killing of Mr. Fares, 46, comes as the war in Syria is winding down. President Bashar al-Assad has retaken most of the country with the help of Russia and Iran, although armed rebels and Kurdish militias backed by the United States still hold significant territory.

But for those like Mr. Fares who saw the uprising against Mr. Assad as a revolution and hoped it would bring democracy, his killing was a bitter sign of how remote that dream has become.