KABUL, Afghanistan — Afghanistan's army chief and defense minister resigned on Monday, following a Taliban attack over the weekend that struck a northern army base, killing more than 100 military and other personnel, officials said.

The attack — the biggest ever by the Taliban on a military base in Afghanistan — involved multiple gunmen and suicide bombers in army uniforms who penetrated the compound of the 209th Corps of the Afghan National Army in northern Balkh province on Friday, killing and wounding scores.

The Taliban claimed responsibility for the assault, which according to some estimates killed over 130 people.

Also on Monday, a police official said at least four security guards were killed when a suicide bomber attacked their checkpoint in eastern Afghanistan.

President Ashraf Ghani accepted the resignations of the army chief of staff and the country's defense minister, according to a statement from the president's office. It was not immediately clear who would replace Defense Minister Abdullah Habibi and Army Chief of Staff Qadam Shah Shahim.

The authorities have not released definitive numbers for the casualty tolls but Afzel Hadid, the head of the provincial council in Balkh, told The Associated Press that at least 130 people were killed and 80 were wounded.

A senior American military official in Kabul on Monday gave the latest Afghan estimate as standing at 144 Afghan soldiers killed and said it was likely to rise further.

An Afghan national Army stands guard at a checkpoint in the Kabul-Jalalabad highway on the outskirts of Kabul, Afghanistan, Saturday, April 22, 2017. Authorities on Saturday raised the casualty toll to 100 in an attack on a military compound in northern Afghanistan a day earlier by gunmen and suicide bombers wearing army uniforms.

Photo Credit: Rahmat Gul/AP

The official said it appears likely the attack was either carried out by or planned by a Pakistan-based Taliban faction known as the Haqqani network, which is a U.S. government-designated terrorist organization. The official, who spoke on condition of anonymity in order to discuss intelligence matters, added the assault likely took four to six months to plan and that it was also likely the attackers had help in advance from Afghan troops on the base.

Also on Monday, U.S. Defense Secretary Jim Mattis arrived unannounced in Kabul to assess what has become America's longest war as the Trump administration weighs sending in more U.S. troops to help the Afghans fight the insurgency.

Ghani traveled to the base in Balkh on Saturday from where he strongly condemned the attack, according to a tweet from the official Twitter account of the presidential palace. Afghanistan marked a day of national mourning on Sunday, with memorial services held at mosques and the Afghan flag flying at half-staff on government buildings and offices.

In the Taliban's detailed statement on the attack, posted on the militant group's website, spokesman Zabihullah Mujahid said that four of the 10 attackers were disguised as soldiers.

The statement said the attack was in retaliation for the killing of the Taliban shadow governor of Kunduz province, Mullah Abdul Salam Akhund, and threatened more violence against the army and police, saying "this year's operations will be painful."

The attackers managed to pass through two checkpoints at the base, driving in two military vehicles. When security guards stopped them at a third gate, the attackers opened fire and two suicide bombers blew themselves up.

The military's 209th corps is located in the Dihdadi district of Balkh. It is one of seven corps of the country's Ministry of Defense, which is responsible for providing security for Afghanistan's northern and northeastern provinces.

The attack in Balkh raises serious questions about the Afghan military's capability to stand on its own in the battle against the insurgency following the withdrawal of foreign combat forces at the end of 2014. The American and other foreign troops remaining in Afghanistan are now mostly acting in an advisory and training role, with some combat assistance.

In March, an attack on a military hospital in Kabul killed 50 people. Responsibility for that attack was claimed by the Islamic State group, which has emerged and gained a foothold in Afghanistan over the past years.

Gen. Faizullah Ghyrat, a provincial police chief in Khost province, said at least four security guards were killed after a suicide bomber attacked their checkpoint in eastern Afghanistan on Monday. He said six other security guards were wounded in the attack.

The suicide bomber used a mini-van and targeted the guards, who were providing security for a U.S. military base near the city of Khost, said Ghyrat. No group claimed immediate responsivity for the attack, but Taliban insurgents are active in the area.

AP National Security Correspondent Robert Burns in Kabul, Afghanistan, contributed to this report.

More In Pentagon & Congress