TRIPOLI, Libya – NATO warplanes bombed Libyan naval vessels in three ports Friday, leaving ships partially sunken and charred and showering docks with debris in the military alliance’s broadest attack on Moammar Gadhafi’s navy.

NATO said the overnight bombing runs were meant to protect the nearby rebel-held port of Misrata, the only major city in western Libya that is under the control of the fighters trying to end Gadhafi’s nearly 40-year rule. One of the attacks struck the main port of Tripoli, and reporters could see flames and smoke pouring up into the night sky from stricken vessels.

In a later tour of the area, journalists saw three partially submerged boats armed with missile launchers docked alongside one another. The blasts peeled away part of a gun turret. Altogether, eight coast guard boats and one docked frigate under repair were hit at the three ports, said Commandant Omran al-Forjani, head of Libya’s coast guard.

At NATO headquarters in Brussels, the alliance confirmed its warplanes targeted the boats and accused Libya of using its ships in the escalating conflict, including attempts to mine Misrata’s harbor, a key lifeline to the besieged city. The other ports hit were in the city of Khoms, between Tripoli and Misrata, and in Sirte, farther east, Libyan officials said.

British Maj. Gen. John Lorimer, a NATO communications officer, said British warplanes hit two Libyan corvette warships in the Khoms harbor.