Nobody was hurt when the projectile hit the building’s kitchen, located on the same floor as Maiteeq’s office, the aide said, adding that the premier had not been there.
Hours earlier a renegade Libyan general, Khalifa Haftar, survived an assassination attempt outside Benghazi, army sources said.
Libya has been plagued by political infighting, with government and parliament unable to control militias that have continued to defy state authority since ousting Muammar Gaddafi in 2011.
Maiteeq was elected by parliament last month in a chaotic vote that many lawmakers disputed. Outgoing Premier Abdullah Al-Thinni has refused to hand over power, saying he wanted to wait for a legal ruling on whether Maiteeq’s election was legitimate.
In an attempt to reinforce his authority, Maiteeq took over the prime minister’s office on Monday night, backed by a police escort.
Earlier, a suicide bomber drove a Land Cruiser packed with explosives to retired general Haftar’s base, his spokesman Mohamed El-Hejazi said, adding Haftar had not been hurt.
Military sources said two of Haftar’s guards were killed.
According to Haftar, his campaign is an attempt to purge the North African country of Islamists, who he blames for much of the violence and instability it has suffered since 2011.