"Initial casualties indicate that 28 students of the military academy were killed and 18 others were injured as a result of an airstrike by foreign air force supporting the war criminal Haftar (commander of eastern-based army)," the UN-backed government's forces said in a statement.
The UN-backed government's forces posted photos on their official Facebook page showing bodies and injured students, as well as ambulances rushing to the academy's headquarters in Tripoli.
The eastern-based army has not committed on the airstrike so far.
The eastern-based army, led by General Khalifa Haftar, has been leading a military campaign in and around Tripoli since early April, trying to take over the city and topple the UN-backed government.
Thousands have been killed and injured in the fighting, and more than 120,000 people fled their homes from the violence.