A rare female suicide bomber deployed in the deadly al-Shabab attack in the office of Mogadishu’s mayor was aiming for the American who is the new U.N. 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 U.N. 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.