KABUL, Afghanistan — Taliban militants attacked the compound of an American-run contractor in the Afghan capital on Wednesday, killing at least five people and sending a stinging message to the United States as it engages in peace talks with the group.

The attack in Kabul, the capital, which the Interior Ministry said also wounded 24, was a clear signal about the state of the peace process even after the Taliban leadership met with American negotiators last week in the sixth round of peace talks in Doha, Qatar.

The American charity CARE said three employees in its Afghanistan office were killed. CARE maintains a compound near the site of the contractor that was targeted, Counterpart International, which said all of its employees were safe and accounted for.

“Today’s attack showed that the Taliban don’t believe in peace — it was a direct message to the Americans that the Taliban will be the winner of the Afghan war,” said Atiqullah Amarkhel, a retired Afghan Army general and military analyst.