KABUL, Afghanistan — The United States must confront Russia for providing weapons to the Taliban for use against American-backed forces in Afghanistan, top U.S. military officials said Monday.



At a news conference with Defense Secretary Jim Mattis at his side, Gen. John Nicholson, the American commander in Afghanistan, wouldn't provide specifics about Russia's role in Afghanistan. But said he would "not refute" that Moscow's involvement includes giving weapons to the Taliban.



While other U.S. officials have accused Russia of helping Taliban insurgents, Nicholson is the first to publicly indicate that such support extends to arms.



Earlier Monday, a senior U.S. military official told reporters in Kabul that Russia was giving machine guns and other medium-weight weapons. The Taliban are using the weapons in the southern provinces of Helmand, Kandahar and Uruzgan, according to the official, who briefed journalists on intelligence information on condition of anonymity.



Russia denies that it provides any such support to the Taliban, which ruled Afghanistan until the U.S.-led invasion in 2001. Russia says contacts are limited to safeguarding security and getting the hard-line religious fundamentalists to reconcile with the government — which Washington has failed for years to advance. Russia also has promoted easing global sanctions on Taliban leaders who prove cooperative.



Asked about Russia's activity in Afghanistan, where it fought a bloody war in the 1980s and withdrew in defeat, Mattis alluded to the increasing U.S. concerns.



"We'll engage with Russia diplomatically," Mattis said. "We'll do so where we can, but we're going to have to confront Russia where what they're doing is contrary to international law or denying the sovereignty of other countries."



"For example," Mattis told reporters in the Afghan capital, "any weapons being funneled here from a foreign country would be a violation of international law."



Mattis met with President Ashraf Ghani and other senior government officials just hours after the nation's defense minister and Army chief resigned over a massacre of more than 140 Afghan troops at a military base last Friday.



Nicholson also said that in view of the sophisticated planning behind the attack, "it's quite possible" that the Pakistan-based Haqqani network was responsible. The Taliban claimed it carried out the attack.



Nicholson, the top American commander in Kabul, recently told Congress that he needs a few thousand more troops to keep Afghan security forces on track to eventually handling the Taliban insurgency on their own.



Mattis on Monday offered a grim assessment for Afghan forces fighting the Taliban.



"2017 is going to be another tough year," he said.



Kabul was the final stop on Mattis' six-nation, weeklong tour. He is the first member of President Donald Trump's Cabinet to visit Afghanistan. As part of the administration's review of Afghan policy, Trump's national security adviser, Army Lt. Gen. H.R. McMaster, visited Kabul last week to consult with Nicholson and with Afghan officials.



The war began in October 2001. The U.S. has about 9,800 troops in Afghanistan. They ended their combat mission against the Taliban in 2014 but are increasingly involved in backing up Afghan forces on the battlefield.



