An Afghan policeman looks at a bloodstained pavement at the site of an attack by an Afghan national army soldier who opened fire on U.S. troops, at the compound of the provincial governor, in Jalalabad, Afghanistan on April 8, 2015.
PHOTO: AP Photo/Rahmat Gul
An Afghan policeman looks at a bloodstained pavement at the site of an attack by an Afghan national army soldier who opened fire on U.S. troops, at the compound of the provincial governor, in Jalalabad, Afghanistan on April 8, 2015.
Now playing
01:26
U.S. service member killed in Afghanistan
Alleged Taliban fighters and other militants stand handcuffed while being presented to the media at a police headquarters in Jalalabad on March 6, 2018. 
Afghan police said over 17 alleged Taliban militants including two Pakistani nationals were arrested during a five-week operation in Nangarhar province. / AFP PHOTO / NOORULLAH SHIRZADA        (Photo credit should read NOORULLAH SHIRZADA/AFP/Getty Images)
PHOTO: NOORULLAH SHIRZADA/AFP/AFP/Getty Images
Alleged Taliban fighters and other militants stand handcuffed while being presented to the media at a police headquarters in Jalalabad on March 6, 2018. Afghan police said over 17 alleged Taliban militants including two Pakistani nationals were arrested during a five-week operation in Nangarhar province. / AFP PHOTO / NOORULLAH SHIRZADA (Photo credit should read NOORULLAH SHIRZADA/AFP/Getty Images)
Now playing
01:21
The Taliban: How it began, and what it wants
PHOTO: CNN
Now playing
00:50
Pence: Proud of US troops in Afghanistan
Now playing
00:50
Trump on Afghanistan plan: 'Attack we will'
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017.
Trump said a rapid Afghan exit would leave
PHOTO: NICHOLAS KAMM/AFP/Getty Images
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017. Trump said a rapid Afghan exit would leave 'vacuum' for terrorists. / AFP PHOTO / Nicholas Kamm (Photo credit should read NICHOLAS KAMM/AFP/Getty Images)
Now playing
02:08
The pillars of Trump's Afghanistan strategy
CAMP BLESSING, AFGHANISTAN - OCTOBER 22:  Artilerymen await coordinates before firing a 155mm Howlitzer on a Taliban position October 22, 2008 from Camp Blessing in the Kunar Province of eastern Afghanistan. Their unit, Charlie Battery, 3rd Battalion of the 321 Field Artilery, has fired more than 5,900 shells since it deployed to Afghanistan less than a year ago, making it the busiest artilery unit in the U.S. Army, according to to military officers. They most often fire in support of Army infantry units battling Taliban insurgents in the nearby Korengal Valley, site of some of the heaviest fighting in Afghanistan.  (Photo by John Moore/Getty Images)
PHOTO: John Moore/Getty Images
CAMP BLESSING, AFGHANISTAN - OCTOBER 22: Artilerymen await coordinates before firing a 155mm Howlitzer on a Taliban position October 22, 2008 from Camp Blessing in the Kunar Province of eastern Afghanistan. Their unit, Charlie Battery, 3rd Battalion of the 321 Field Artilery, has fired more than 5,900 shells since it deployed to Afghanistan less than a year ago, making it the busiest artilery unit in the U.S. Army, according to to military officers. They most often fire in support of Army infantry units battling Taliban insurgents in the nearby Korengal Valley, site of some of the heaviest fighting in Afghanistan. (Photo by John Moore/Getty Images)
Now playing
00:54
Trump: US in Afghanistan to kill terrorists
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017.
Trump warned Monday that a hasty exit from Afghanistan would create a "vacuum" that would benefit America
PHOTO: NICHOLAS KAMM/AFP/Getty Images
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017. Trump warned Monday that a hasty exit from Afghanistan would create a "vacuum" that would benefit America's jihadist foes, in a major policy address on his strategy in the 16-year conflict. / AFP PHOTO / Nicholas Kamm (Photo credit should read NICHOLAS KAMM/AFP/Getty Images)
Now playing
00:42
Trump calls terrorists 'losers'
President Donald Trump speaks at Fort Myer in Arlington Va., Monday, Aug. 21, 2017, during a Presidential Address to the Nation about a strategy he believes will best position the U.S. to eventually declare victory in Afghanistan. (AP Photo/Carolyn Kaster)
PHOTO: Carolyn Kaster/AP
President Donald Trump speaks at Fort Myer in Arlington Va., Monday, Aug. 21, 2017, during a Presidential Address to the Nation about a strategy he believes will best position the U.S. to eventually declare victory in Afghanistan. (AP Photo/Carolyn Kaster)
Now playing
01:21
Trump: Our support is not a blank check
Now playing
00:45
Trump acknowledges flip-flop on Afghanistan
PHOTO: POOL
Now playing
01:04
Trump: Love for America requires love for all
president trump afghanistan war plan troop address_00003227.jpg
PHOTO: CNN
president trump afghanistan war plan troop address_00003227.jpg
Now playing
01:34
Trump: We produce a special class of heroes
US President Donald Trump walks by as reporters shout questions to him upon his arrival on the South Lawn at the White House on August 14, 2017 in Washington, DC. Later today President Trump will be meeting from Attorney General Jeff Sessions and FBI Director Christopher Wray regarding this weekendÕs events in Charlottesville, Virginia. (Mark Wilson/Getty Images)
PHOTO: Mark Wilson/Getty Images
US President Donald Trump walks by as reporters shout questions to him upon his arrival on the South Lawn at the White House on August 14, 2017 in Washington, DC. Later today President Trump will be meeting from Attorney General Jeff Sessions and FBI Director Christopher Wray regarding this weekendÕs events in Charlottesville, Virginia. (Mark Wilson/Getty Images)
Now playing
02:24
Will Trump send more troops to Afghanistan?
WASHINGTON, DC - JUNE 13:  U.S. Defense Secretary James Mattis testifies before the Senate Armed Services Committee during a hearing in the Dirksen Senate Office Building on Capitol Hill June 13, 2017 in Washington, DC. Mattis and other Pentagon leaders testified about the proposed FY2018 National Defense Authorization Budget Request.  (Photo by Chip Somodevilla/Getty Images)
PHOTO: Chip Somodevilla/Getty Images
WASHINGTON, DC - JUNE 13: U.S. Defense Secretary James Mattis testifies before the Senate Armed Services Committee during a hearing in the Dirksen Senate Office Building on Capitol Hill June 13, 2017 in Washington, DC. Mattis and other Pentagon leaders testified about the proposed FY2018 National Defense Authorization Budget Request. (Photo by Chip Somodevilla/Getty Images)
Now playing
01:25
Mattis: New Afghanistan strategy decided
PHOTO: Getty Images
Now playing
01:27
US troops in Afghanistan: A history (2017)
An injured man is transported after a car bomb attack in western Kabul, Afghanistan, on Monday, July 24.
PHOTO: WAKIL KOHSAR/AFP/Getty Images
An injured man is transported after a car bomb attack in western Kabul, Afghanistan, on Monday, July 24.
Now playing
00:46
Dozens killed in Kabul car bombing
PHOTO: CNN
Now playing
02:52
Marines remaining in Afghanistan face hardship

Story highlights

Gunfire erupts after senior U.S. official meets with Afghan governor in Jalalabad, U.S. Embassy says

Afghan soldier fires at U.S. troops, Afghan police official says

(CNN) —  

A U.S. Army soldier was killed Wednesday in an attack in eastern Afghanistan by an Afghan National Army gunman, a U.S. military official told CNN, shortly after an American official met with a provincial governor.

A U.S. defense official didn’t provide details about the attack in the city of Jalalabad. But an Afghan police chief told CNN that an Afghan National Army soldier shot at U.S. soldiers at a provincial governor’s compound in Jalalabad on Wednesday.

The Afghan soldier opened fire on the U.S. troops as they were leaving a meeting at the compound, said Fazal Ahmad Shirzad, police chief of Nangarhar province.

An Afghan soldier was killed and another was injured in a subsequent exchange of gunfire, Shirzad said. It wasn’t immediately clear whether the assailant was among them.

A senior U.S. official had just held a meeting with Nangarhar’s governor at the compound when gunfire erupted, a U.S. Embassy representative said. The embassy representative didn’t identify the official but said that all diplomatic personnel had been accounted for after the incident.

The U.S. military official didn’t know yet what motivated the shooting.

Other troops were injured in the attack, the U.S. defense official said, speaking on condition of anonymity. Those troops belong to the NATO-led Resolute Support mission meant to train and support Afghan troops.

The defense official did not provide the nationalities of the injured Resolute Support troops. Most of the troops involved with Resolute Support are with the U.S. military.

CNN national security analyst Peter Bergen said that despite Wednesday’s incident, instances of “green-on-blue” attacks are declining overall for several reasons.

“First, there are far fewer US soldiers in Afghanistan,” Bergen said. “Second more counterintelligence resources were devoted to countering the threat and third, an attempt was made to better vet afghan army recruits.”

CNN’s Masoud Popalzai and Jim Sciutto contributed to this report from Kabul, Afghanistan.