On 23 February 1942. the Imperial Japanese Navy's submarine I-17, under the command of Commander Nishino Kozo, surfaces shells the oil refinery near Santa Barbara. Before the war, as skipper of an oil tanker, Nishino had refueled there. The shelling does only minor damages to a pier and an oil well derrick, but creates "invasion" fears along the West Coast.
Contemporary newspaper accounts describe the attack as off the Ellwood oil fields 12 miles north of Santa Barbara, and report 16 shells fired, beginning at 7:15 p.m. on the 23rd of February 1942. Three shells struck near the Bankline Co. oil refinery, the apparent target of the shelling. Rigging and pumping equipment at a well about 1,000 yards inland were destroyed but otherwise no damage was caused. One shell overshot the target by three miles and landed on the Tecolote ranch, where it exploded. Another landed on the nearby Staniff ranch, dug a hole five feet deep, but failed to explode. Eleven other shells fell short and dropped into the sea. Description of the attack and damage to the oil refinery was provided by the superindentent, F.W. Borden. The first report of the attack was called in to police by Mrs. George Heaney of San Marcos Pass, who observed the submarine through binoculars and reported it was about a mile offshore. Oil refinery worker Bob Miller also called in a report during the attack. According to the official report of the 11th Naval District, the I-17 surfaced at 7:10 pm, Pacific War Time (2 hours ahead of standard time, so about a half hour after sunset), shortly after President Roosevelt's weekly fireside "chat" began. At 7:15 pm, the submarine began firing from its deck gun at the oil refinery. It ceased firing at 7:35 and departed on the surface; it was observed still on the suface exiting the south end of the Santa Barbara Channel at 8:30.
A 1982 issue of Parade magazine published a possible reason for the attack:
The first Japanese attack on the U.S. mainland, in 1942, was triggered by cactus spines in the rear end of a Japanese naval captain.
In the late 1930s, Kozo Nishino was commander of a Japanese tanker taking on crude oil at the Ellwood oil field. On the way up the path from the beach to a formal ceremony welcoming him and his crew, Nishino slipped and fell into a prickly-pear cactus. Workers on a nearby oil rig broke into guffaws at the sight of the proud commander having cactus spines plucked from his posterior. Then and there, the humiliated Nishino swore to get even.
He had to wait for war between the U.S. and Japan, but on Feb. 23, 1942, he got his revenge. From 7:07 to 7:45 p.m., he directed the shelling of the Ellwood oil field from his submarine, the I-17. Though about 24 shells were fired from a 5.5-inch deck gun, little damage was done. One rig needed a $500 repair job after the shelling, and one man was wounded while trying to defuse an unexploded shell.
U.S. planes gave chase to the sub, but Nishino got away. Thereafter, American coastal defenses were improved, so the mainland suffered only one more submarine attack by the Japanese during the war, at Fort Stevens in Oregon.
Most accounts however have the I-17 firing 16 17 rounds fired from 19:15 to 19:35 hours