"Despite strong resistance from the Taliban, Afghan forces defeated them," the ministerial statement read, as quoted by The Wall Street Journal.
According to other media reports, the Taliban militants denied this information.
According to The Wall Street Journal, some 500 elite Afghan special-operations forces participated in the operation.
The Taliban military movement launched a large-scale offensive in April, despite continuous attempts by the Afghan government to resume peace talks. In May, the militants surrounded the city of Kunduz.
According to local authorities, Islamic State jihadists are also active in Afghanistan, trying to take advantage of the current instability to gain a foothold in the country.