An attack targeted the home and office of the Libyan prime minister's nephew in Tripoli, leaving no casualties, local media reported Monday.

Libyan television channel Al-Wasat said one of the residences of Ibrahim Dbeibah -- who also serves as an advisor to his uncle, Prime Minister Abdulhamid Dbeibah -- was damaged on Sunday by two rocket-propelled grenades.

Citing an anonymous security source, the channel said Ibrahim Dbeibah was not home when the two rockets hit his office and the roof of his adjacent villa in the Libyan capital's residential neighbourhood of Hay Al-Andalus.

The 166 Brigade, an armed unit responsible for the area's security, "immediately shut down the street and called in the firefighters," said the security source.

"Two loud explosions followed by machine gun fire and police sirens" were heard late Sunday around the time of the reported strikes, a resident speaking on condition of anonymity told AFP by telephone.

No group immediately claimed responsibility for the attack, and no official comment has been made.

The affluent Hay Al-Andalus neighbourhood, west of downtown Tripoli, has largely been spared attacks and fighting that have previously gripped other parts of the capital.

The residence is several blocks from a villa that the prime minister uses as an office.

Libya is still struggling to recover from years of war following the overthrow and death of longtime dictator Moamer Kadhafi in 2011.

The country's rule is split between rival administrations in Tripoli in the west, and Benghazi in the east.