The US has condemned in the strongest terms the suicide attack on worshippers at a mosque in Afghanistan in which at least 46 people were killed, saying the Afghan people deserve a "future free of terror".

The Islamic State terror group has claimed responsibility for the suicide bombing that tore through the packed Shiite Mosque in northern Afghanistan's city of Kunduz.

At least 46 people were killed and dozens of others injured in the attack which was the latest in a series of Islamic State bombings targeting Afghanistan's new Taliban rulers, religious institutions and members of the country's minority Shiite Muslims.

In a statement on Friday, State Department Spokesperson Ned Price said that the US condemns in the strongest terms the Friday's attack on worshippers at a mosque in northern Afghanistan.

"We offer our deepest condolences to the victims and their families. The Afghan people deserve a future free of terror," Price said.

White House Press Secretary Jen Psaki told reporters at her daily news conference: Obviously, any loss is an enormous tragedy, and our heart goes out to the families who lost loved ones".

"We, of course, will continue to work in partnership with leaders in the region to work to get partners who stood by our side out of Afghanistan, who want to depart. That's something that there's ongoing work on, as we speak," Psaki added.

The Islamic State's Afghanistan affiliate, dubbed Islamic State Khorasan (ISIS-K) which has stepped up attacks in several Afghan cities since the Taliban seized power in Kabul on August 15, had claimed the deadly suicide attack at Kabul airport on August 26 that killed nearly 170 Afghans and 13 US military personnel.