McGonagle took command of the in April 1966. On June 8, 1967, during the Six-Day War between Israel and her Arab neighbors, the "Liberty" was attacked by Israeli forces while sailing in international waters in the Eastern Mediterranean. The Israeli government claims to this day that they thought that the ship was an Egyptian vessel. Israel relentlessly attacked the "Liberty" with jets, helicopters, and motor torpedo boats. McGonagle was severely wounded during the first air attack and although the bridge had sustained heavy damage he stayed and directed the defense of the ship, refusing to leave his post for medical attention. As the Israeli fighters continued their attack he maneuvered his ship, directed its defense, supervised the control of flooding and fire, and saw to the care of the casualties. Captain McGonagle remained at his battle station and continued to command his ship for more than 17 hours. It was only after rendezvous with a United States destroyer that he relinquished personal control of the "Liberty" and permitted himself to be removed from the bridge. The combined air and sea attack killed 34 crew members including naval officers, seamen, two Marines, and a civilian, wounded 171, and severely damaged the ship. Although the ship had a 39 ft (12 m) wide by 24 ft (7.3 m) high hole and a twisted keel from a torpedo impact, the crew kept the ship afloat, and were able to leave the area under their own power. When the damage to the ship was assessed 821 rocket, shell, and machine-gun holes were found in the ship's hull.