The attack on Yokosuka was an air raid conducted by the United States Navy on 18 July 1945 during the last weeks of the Pacific War. The Japanese battleship Nagato was the raid's main target, though anti-aircraft positions and other warships at Yokosuka Naval Arsenal were also attacked. Other U.S. Navy and British Royal Navy aircraft struck airfields in the Tokyo area. While Nagato was only lightly damaged, the American aircraft sank a destroyer, a submarine and two escort vessels and damaged five small vessels. The Allied pilots also claimed the destruction of several locomotives and 43 Japanese aircraft as well as damage to another 77 aircraft. Japanese anti-aircraft guns shot down twelve American and two British aircraft.
During July 1945 the U.S Third Fleet, which was led by Admiral William Halsey, conducted a series of air raids and naval bombardments against targets in Japan. These attacks were made by the Third Fleet's striking force, Task Force 38 (TF 38), which was commanded by Vice Admiral John S. McCain and included nine fleet carriers, six light carriers and their escorts. Almost one thousand aircraft were embarked on board these carriers. On 10 July TF 38's aircraft struck airfields around Tokyo and claimed to have destroyed 340 Japanese aircraft on the ground and two in the air. No Japanese aircraft responded to this attack as they were being held in reserve to mount large-scale suicide attacks on the Allied fleet during the expected invasion of the country later in 1945. Following this raid, the Third Fleet conducted raids on Hokkaido and northern Honshu on 14 and 15 July which sank large numbers of ships and destroyed 25 aircraft on the ground. The American warships then sailed south and on 16 July were joined by the British Pacific Fleet's (BPF's) main striking force, which was designated Task Force 37 (TF 37), and comprised three aircraft carriers and their escorts.
By July 1945 all of the Imperial Japanese Navy's (IJN's) remaining large warships were unable to put to sea due to shortages of fuel and the dangers of attack from Allied aircraft and submarines. While most of these warships were anchored near the major naval base at Kure and other locations in the Seto Inland Sea, Nagato and several smaller warships were stationed at Yokosuka Naval Arsenal in Tokyo Bay. At this time the battleship was moored alongside a pier facing northwest and covered in camouflage that was intended to make her difficult for aircraft to spot. All of Nagato's secondary armament and about half her anti-aircraft guns had been removed and emplaced on nearby hills from where they could provide protection to the naval base. Although the battleship's boilers were not lit, she received steam and power from the submarine chaser Fukugawa Maru No. 7 and an auxiliary boiler located on the pier. The destroyer Ushio was also docked nearby in a position where she was able to protect the battleship with her 25 mm anti-aircraft guns. Nagato's presence at Yokosuka was revealed to the Allies by photographs taken during the 10 July raid on the Tokyo area. On 16 July Halsey and Vice Admiral Bernard Rawlings, the commander of TF 37, met to plan raids on the Tokyo area. Halsey was determined to sink the remnants of the IJN, and placed a particularly strong emphasis on attacking Nagato as she had been Admiral Isoroku Yamamoto's flagship during the attack on Pearl Harbor in December 1941. Due to the battleship's position within a well defended harbor, the Third Fleet's planners assessed that aircraft which attempted the straight and level flight needed to launch torpedoes against her would suffer heavy losses, and so decided to use dive bombing tactics instead. As the landward side of the naval base was mountainous, the approaches which could be used by dive bombers were limited, however.
On 17 July the American and British fleet attempted to strike the Yokosuka Naval Arsenal and other targets in the Tokyo area. While two waves of aircraft were dispatched, the attack was frustrated by heavy cloud over the region and further attacks were canceled. The aircraft which reached the Tokyo area struck airfields north of the city and caused little damage. While the naval base was not attacked, it was overflown by an American fighter and its defenders were readied to respond to attacks. On the night of 17–18 July American and British warships bombarded the city of Hitachi.
The next day, the Allied fleet sailed south looking for weather which was better suited to conducting flight operations. Conditions improved during the morning, and at 11:30 am the day's air strikes began to launch. The British aircraft of TF 37 were dispatched against airfields in the Tokyo area. The size of this attack was considerably reduced from what was planned, however, as the fuel system on board HMS Victorious had become contaminated with water and the carrier could only launch six Vought F4U Corsair fighters. TF 38's main effort was directed against Yokosuka Naval Arsenal, with Nagato being designated the raid's primary target. A smaller number of American aircraft were also dispatched to raid Japanese air fields.
The attack on Yokosuka began at about 3:30 pm on 18 July. The first wave of American aircraft attacked the anti-aircraft batteries around the naval base, and succeeded in neutralizing them. Following this, the aircraft of VF-88 attacked Nagato with bombs. A 500 pound general-purpose bomb struck the battleship's bridge, killing her commanding officer, Rear Admiral Otsuka Miki as well as the executive officer and at least nine other men. Another 500 pound bomb later struck Nagato and detonated near her officer's mess, killing about 22 sailors and knocking out four 25 mm guns. The only other direct hit on the ship was made by a 5-inch (130 mm) shell or rocket which did not explode. In addition, 60 bombs landed in the harbor near Nagato, causing breaches to her double hull which let 2,000 tons of water into the ship. By the time the attack concluded at 4:10 pm, 35 of the battleship's 967 officers and men had been killed. The overall damage to the ship was later assessed as being light. American aircraft also attacked several other ships docked at Yokosuka. The unfinished Matsu class destroyer Yaezakura broke in two and sank after being bombed, and the submarine I-372 was destroyed by another bomb; at the time the submarine's crew was ashore and did not suffer any fatalities. Two escort vessels and a torpedo boat were also sunk. In addition to these losses, five other ships, including the obsolete destroyer Yakaze and training ships Fuji and Kasuga were damaged. Despite their proximity to Nagato, Fukugawa Maru No. 7 and Ushio were not damaged. The British and United States aircraft dispatched against airfields claimed to have destroyed 43 Japanese aircraft and damaged another 77. The pilots of these aircraft also claimed the destruction of several railway locomotives. Allied losses in the attacks made on 18 July were 12 U.S. Navy aircraft, two Royal Navy aircraft and 18 aircrew. The Allied pilots were disappointed they had not sunk Nagato, despite the battleship being the primary target of the raid.
Following its attacks on the Tokyo Bay area on 18 July, the Allied fleet sailed away from Japan to be refueled. Its next attacks were made against the main body of the IJN in Kure and the Inland Sea on 24, 25 and 28 July. These raids sank three battleships, an aircraft carrier and several other warships but cost the Allies 133 aircraft and 102 aircrew killed. The Third Fleet and elements of the BPF continued strikes against targets in Japan until the end of the war on 15 August 1945.
After the attack on Yokosuka, the Nagato's crew removed all casualties from the ship and conducted limited repairs. Some of the ship's ballast tanks were also flooded to give the impression that she had been sunk. During the early hours of 2 August Nagato was ordered to put to sea to intercept an Allied force. However, this sortie was canceled before she had completed preparations to leave port as the report of Allied ships was determined to be false. On 30 August the ship was surrendered to the U.S. Navy. She was one of the target ships for the two atomic bomb tests conducted at Bikini Atoll on 1 and 28 July 1946 during Operation Crossroads, and sank there during the night of 29–30 July.