Afghan forces patrol in Afghanistan’s Nangahar province on Friday. (Ghulamullah Habibi/European Pressphoto Agency)

An Afghan soldier opened fire Saturday at a base shared with U.S. forces in northern Afghanistan, wounding at least seven U.S. soldiers in the second such insider attack last week.

Such incidents remain relatively rare amid the close cooperation between Afghan and foreign forces, but it is likely to draw increased scrutiny from the Pentagon as it plans to boost troop numbers in Afghanistan.

A statement by NATO-led forces said seven U.S. soldiers and one Afghan soldier were wounded when an Afghan army soldier opened fire at Camp Shaheen in Mazar-e Sharif. The attacker was shot and killed, the statement added.

Robert Purtiman, a spokesman for the U.S.-led mission in Afghanistan, said there were no U.S. or NATO fatalities.

Camp Shaheen is home to the Afghan army’s 209th Corps and was the site of a complex Taliban attack in April that killed more than 130 Afghan soldiers.

On June 10, three U.S. soldiers were killed and another was wounded in the Achin district of Nangahar province when an Afghan commando opened fire on them. The soldiers were assisting operations against the Islamic State in the restive eastern province.

Six U.S. troops have been killed by hostile fire in Afghanistan so far in 2017. More than 2,000 U.S. troops have died of both combat and noncombat causes in the country since 2001.

Saturday’s incident comes just days after President Trump delegated authority to Defense Secretary Jim Mattis to set U.S. troop levels in Afghanistan, opening the door for a possible of influx of forces that could number in the thousands.

In April, Taliban gunmen and suicide bombers attacked the same sprawling Afghan army training base, leaving scores of Afghan soldiers dead and scores more wounded.

The attackers, some dressed in Afghan military uniforms, managed to pass through two checkpoints in military vehicles before being stopped, after which they opened fire on the busy compound. The brazen assault, which came as Mattis arrived in Afghanistan, led to the dismissal of Afghanistan’s top defense officials by President Ashraf Ghani.

There are about 8,500 U.S. troops and 5,000 NATO forces in Afghanistan.

Salahuddin reported from Kabul. Pamela Constable in Islamabad contributed to this report.