MOGADISHU: A rare female suicide bomber used in the deadly Al-Shabab attack in the office of Mogadishu’s mayor was aiming for the American who is the new UN envoy to Somalia and had left the office just minutes earlier, the extremist group and officials said. The death toll in Wednesday’s attack rose to seven and the seriously wounded Mayor Abdirahman Omar Osman was in a coma Thursday. He and other officials were expected to be airlifted to Qatar for treatment, said Mohamed Ahmed, a government official at the Mogadishu hospital treating the mayor. The new UN envoy, James Swan, was the bomber’s intended target, Abdiaziz Abu Musab, Al-Shabab’s military spokesman, told local media. Capt. Mohamed Hussein, a senior police officer, said the female bomber walked into a security meeting and blew herself up a few yards away from the mayor. It was just the fourth time the Al-Qaeda-linked Al-Shabab had been known to use a female suicide bomber. Swan had paid the Somali capital’s mayor a brief visit and left the compound less than an hour before the bombing, an official at the mayor’s office told The Associated Press. In a statement, Swan condemned “this heinous attack, which not only demonstrates a violent disregard for the sanctity of human life, but also targets Somalis working to improve the lives of their fellow Somalis.” The US ambassador to Somalia, Donald Yamamoto, and UN Secretary-General Antonio Guterres also condemned the attack. UN deputy spokesman Farhan Haq said that “any threats against any UN personnel anywhere in the world are a matter of grave concern for the secretary-general” and the UN reviews its security after such attacks. “We want to make sure that all of our personnel everywhere are protected and able to go about their work free of any hindrance and free of any threats,” Haq said, adding that Guterres will be writing to Swan and the UN staff in Somalia to express “solidarity with their work and our concern for their safety.” It was not clear how the bomber managed to enter the mayor’s office, as visitors are required to pass through at least four metal detectors. Some security officials said the attacker might have bribed corrupt officials. Al-Shabab often targets government buildings such as the presidential palace and other high-profile parts of Mogadishu with bombings. The Somalia-based group was chased out of Mogadishu years ago but still controls parts of the Horn of Africa nation’s south and central regions and is a frequent target of US airstrikes. The security officials said Wednesday’s attack appeared to be a shift in tactics, as the extremists in the past had rarely managed to infiltrate heavily fortified government buildings without first detonating one or more vehicle bombs.