– Dozens of soldiers and police officers were killed or captured in nine Taliban attacks that overran security bases and outposts in different parts of Afghanistan during a 24-hour period that ended Tuesday, officials said.

In perhaps the most severe blow, insurgents captured battalion headquarters of the Afghan Border Force in Farah Province in western Afghanistan, killing or taking prisoner nearly the entire contingent of officers, with as many as 20 dead. In Kandahar Province in the south, three separate attacks killed a total of 17 police officers. And in Ghazni, a central province, a joint military and police outpost fell only two days after it had been set up, with all 16 security officials there killed or wounded.

The attack on the headquarters in Farah, close to the Iranian border, destroyed the first battalion’s base in the district of Poshti Koh. Sgt. Gholam Mohammad, the senior noncommissioned officer, said from a clinic where he had been taken with a minor head wound that, in addition to the 20 border force officers killed, 25 had been taken captive by the Taliban. Three others escaped.

The Taliban spokesman, Zabiullah Mujahid, claimed responsibility for the capture of the headquarters in posts on Twitter that purported to show weapons seized at the base.

In all, 59 police officers or soldiers were confirmed killed in the nine attacks Monday and Tuesday, which took place in seven provinces.

By comparison, in the week that ended Thursday, 18 Afghan security officials were killed, according to a tally by the New York Times.

The Afghan Border Force falls under the control of the Ministry of Defense, although it was part of the police until last year. Mohammad was in charge of logistics at the Farah base.

“The Taliban first captured our radio officer and our contact with other units was cut off,” he said by telephone. “Then they intensified their attack.”

The assault started at 11 p.m. Monday and continued into the early hours Tuesday, he added, by which time the defenders ran out of ammunition and the insurgents took control of the base.

A spokesman for the Ministry of Defense, Ghafoor Ahmad Jawed, said that reinforcements were being sent to try to recapture the base and that the authorities were unsure of the number of casualties. Other Afghan officials gave divergent tallies. Abdul Hakim, the district governor of Poshti Koh, said 18 officers had been killed and 23 others taken prisoner. There were 48 officers in the battalion.

In another attack Monday, the Taliban targeted a security outpost in the district of Khogyani, in Ghazni Province, killing at least 13 members of the Afghan security forces and wounding three others, according to Mohammad Arif Noori, the governor’s spokesman.

Six Taliban fighters were also killed in the assault and 10 others were wounded, he added.