(CNN) — Two Americans were injured Wednesday in Afghanistan when a U.S. Consulate vehicle was attacked while traveling through the western city of Herat, the U.S. Embassy in Kabul said.
The Americans were "lightly injured" and are being treated in a hospital in the city, it said.
The U.S. government is working with Afghan authorities to investigate the attack and bring those responsible to justice, it said.
Last week, four gunmen attempted to attack the Indian consulate in Herat. Two gunmen were killed in that incident but no one else was injured and the consulate building was not damaged.
The latest attack comes a day after President Barack Obama announced that he plans for 9,800 American troops, along with some allied forces, to remain in the country in 2015 if the Afghan government signs a security agreement.
The number would get cut roughly in half by the end of 2015, and a year later the U.S. military presence would scale down to what officials described as a "normal" embassy security contingent.
Washington and its NATO allies will formally halt combat operations in Afghanistan at the end of this year.
Afghanistan is due to hold a run-off presidential election next month, in which a successor to President Hamid Karzai will be chosen. Both candidates have indicated they will sign the security pact, Obama said.
CNN's Tom Cohen contributed to this report.