KABUL—The Taliban claimed responsibility for a suicide car bombing that targeted a British Embassy vehicle in Kabul on Thursday, saying it was a warning to Afghanistan’s foreign backers a week ahead of a major international conference meant to showcase the country’s new leadership.

The bombing was followed Thursday evening by a separate, sustained attack in the heart of Kabul’s diplomatic quarter. The assault began with a loud blast that rattled windows in the Wazir Akbar Khan district, and was followed by intense gunfire...