KABUL - An Islamic State suicide bomber killed 20 people in northern Afghanistan on Tuesday, including a Taliban commander, while in southern Helmand province, a government commando unit freed 54 people from a Taliban-run jail, officials said.

In southern Kandahar province, the Taliban attacked a police checkpoint in Arghistan district late on Monday night, killing nine policemen and wounding seven, according to Daud Ahmadi, the spokesman for the provincial governor.

Zia Durrani, the provincial police spokesman, said 25 Taliban fighters were killed and 15 were wounded in the ensuing battle in Arghistan, a violate districts close to the Pakistani border.

Afghanistan has faced intense attacks by both the Taliban and the country's Islamic State affiliate recently, even as Washington considers a Taliban demand for direct talks in hopes of jump-starting a negotiated end to what is now the longest military engagement by U.S. forces.

A Taliban official in Qatar, where the Taliban maintain an unofficial office, told The Associated Press the insurgents want direct talks and are ready to put troop withdrawal as well as any outstanding concerns the United States might have on the table - but that so far, no official request to open negotiations has come from Washington.

Speaking on condition of anonymity because he is not authorized to speak to the media, the Taliban official said de-listing Taliban leaders from U.S and U.N. watch lists and recognizing their office in Doha, Qatar's capital, would aid progress in talks, should they begin.

Meanwhile, in northern Afghanistan's Sar-i-Pul province, provincial police chief Abdul Qayuom Baqizoi said Tuesday's attack by IS took place as village elders met with Taliban officials. He said 15 of the 20 killed were local elders and five were Taliban members, including a Taliban commander.

The Taliban and the Islamic State group have been waging bitter battles in recent days in northern Afghanistan. As many as 100 insurgents from both the Taliban and IS have died in the fighting, said Baqizoi.

However, provincial council chief Mohammed Noor Rahman gave a different account of the explosion, saying it occurred in a mosque as a funeral was taking place. The area is remote and it was impossible to reconcile the differing accounts.

Also Tuesday, in southern Helmand's Musa Qala district, a commando unit stormed a jail late Monday that Taliban insurgents had been operating. They found and freed 32 civilians, 16 policemen, four soldiers and two military doctors, said Omar Zwak, spokesman for the provincial governor.

The Taliban did not immediately comment on the raid, but the insurgents are in control of the majority of the districts in Helmand, where they have increased their attacks against provincial officials and security forces.

The Taliban have long refused direct talks with the Afghan government, demanding instead to negotiate with the U.S. They have maintained that position despite Afghan President Ashraf Ghani's unilateral extension of a holiday cease-fire last month in hopes of encouraging the Taliban to come to the negotiating table.

When the Taliban continued to mount deadly attacks, Ghani ordered government forces to resume military operations this month.

Trump administration officials said Monday for the first time that the U.S. would be open to holding direct talks with the Taliban to encourage negotiations between the militant group and the Afghan government to end 17 years of war. They, however, said that Afghan-to-Afghan negotiations remain the goal of any engagement with the militants.

That marks a tactical shift by the U.S. administration, which previously only appeared willing to participate in discussions with the Taliban if those talks also involved the Afghan government. The officials were not authorized to speak to media and requested anonymity.

Last month's unprecedented cease-fire by both sides had offered a rare glimpse of peace for Afghans during which militants fraternized with members of the security forces.

The U.S. invaded Afghanistan following the Sept. 11, 2001, terror attacks, and ousted the Taliban government that had hosted al-Qaida. There are still about 15,000 American troops in Afghanistan, mostly to train Afghan forces.