Stephanie Williams, deputy special representative of the UN secretary-general for political affairs to Libya, expressed relief that there were no injuries in the attack, but noted that shelling of civilian targets may constitute a war crime, the UN Support Mission in Libya said.
Williams made her remarks at a meeting in Tripoli with Mustafa Sanalla, chairman of the state-owned National Oil Corporation (NOC).
On Friday, the Tripoli Oil Clinic belonging to the NOC was hit by shells, causing a fire in the facility without any human casualties, the NOC said, Xinhua news agency reported.
Last week, the NOC expressed concern about the state of lawlessness in the country due to an ongoing armed conflict, and called for an immediate cease-fire.
The east-based army, led by Khalifa Haftar, has been leading a military campaign since early April to take over Tripoli, where the UN-backed government is based.
According to the World Health Organization, the fighting has killed 562 people and injured 2,855 others so far.
Libya has been struggling to undergo a transitional period amid chaos since the fall of former leader Muammar Gaddafi in 2011.