http://www.onwar.com/aced/data/juliet/japanus1937.htm

The Panay Incident 1937
 
The American gunboat USS Panay, which patrolled the Yangtze River near Nanking (Nanjing), China, was used as a bomb shelter for foreign embassy staff during the Japanese bombing of the area. On December 12, 1937, Japanese warplanes suddenly and without provocation dive-bombed repeatedly the Panay and a British gunboat, both of which were moored in the river; the American vessel was sunk, and the British one severely damaged. The US public was outraged by this attack, which caused two deaths and 48 casualties. Claiming its pilots had not seen the US flags painted on the Panay's decks and sides, Japan apologized and paid the indemnity demanded by the United States.

http://www.ibiblio.org/hyperwar/USN/ships/dafs/PR/pr5-sinking.html
 The Sinking of Panay, 12 December 1937
excerpted from
"History of United States Naval Operations in World War II"
Volume 3: "The Rising Sun in the Pacific" (pages 16-18)
by Samuel Eliot Morison
5. The Sinking of PANAY, 12 December 1937
U.S.S. Panay was one of five small, shoal-draft river gunboats that had been built about ten years earlier, primarily for patrolling the Yangtze in order to protect American commerce and American nationals during the Chinese civil war.[12] They were used to being fired upon (and seldom hit) by irresponsible guerrilla bands of Chinese,[13] but what happened to Panay was deliberately planned by responsible Japanese officers. 
On 21 November 1937, when Japanese forces were approaching Nanking, Chiang Kai-shek's foreign office notified the American Embassy that it must prepare to evacuate. The Ambassador and most of the personnel left next day in U.S.S. Luzon; the rest stuck it out for another week, when they decided to depart in Panay. Ambassador Grew so notified the Japanese government on 1 December. On the 11th the gunboat embarked the American officials together with a number of civilians, and started upriver, escorting three Standard Oil barges that also wished to escape. Two British gunboats and a few other British craft followed the same course. For two miles this little flotilla was fired upon repeatedly by a shore battery commanded by Colonel Hashimoto, one of the ringleaders in the assassinations and a prominent Kodo man. His object was to provoke the United States into a declaration of war, which would eliminate civilian influence from the Japanese government and complete the "Showa Restoration." The shooting was so wild that Panay and her convoy, making slow speed against the current, pulled out of range without suffering a hit. An advanced Army unit notified naval authorities that Chinese troops were fleeing the capital in ten ships. 
At 1100 next morning (12 December 1937) Panay and the three tankers anchored near Hoshien, upstream from Nanking. American flags were hoisted on their masts and painted on the awnings and topsides. The day was clear, sunny and still. Panay's ate their Sunday dinner and secured. No guns were manned or even uncovered. Shortly after 1330, three Japanese Navy bombing planes flew overhead and released eighteen bombs, one of which disabled Panay's forward 3-inch gun, wrecked the pilothouse, sick bay and fire room, wounded the captain (Lieutenant Commander J.J. Hughes) and several others. Immediately after, twelve more planes dive-bombed and nine fighters strafed, making several runs over a space of twenty minutes. She fought back with her .30-cal. machine guns. By 1406 all power and propulsion were lost, the main deck was awash and, as Captain Hughes saw that his ship was going down, he ordered her to be abandoned. Japanese planes strafed the boats on their way to shore, and even combed the reeds along the riverbank for survivors. Two of the three oil barges were also bombed and destroyed. The Panay survivors, kindly treated by the Chinese, managed to get word through to Admiral Yarnell and were taken on board U.S.S. Oahu and H.M.S. Ladybird two days later. Two bluejackets and one civilian passenger died of their wounds; eleven officers and men were seriously wounded.[14] 
Mr. Grew, who remembered the Maine, at first expected his country to declare war. But the promptness and apparent sincerity with which the Japanese government and people apologized and expressed their readiness to make what reparation they could, turned away wrath. The Japanese official inquiry resulted in the face-saving explanation that the attack was all a mistake; ships emblazoned with American flags had been mistaken for Chinese at 600 yards' range; it was just to bad. A United States naval Court of Inquiry at Shanghai brought out unmistakable evidence that the sinking was deliberate. But the United States government was so anxious to avoid war that it accepted the "mistake" theory, together with an indemnity. When it did so, a sigh of relief passed over the length and breadth of America.[15] In a Gallup poll conducted during the second week of January 1937, 70 per cent of the American voters who were interviewed and had an opinion on the subject favored a policy of complete withdrawal from China -- Asiatic Fleet, Marines, missionaries, medical missions, and all.[16] 
Apparently no American except Mr. Grew remembered the Maine. 

[12] Panay of 450 tons was 191 ft. long and carried two 3-inch and ten .30-cal. machine guns. 
[13] Annual Report of Navy Department 1930 p. 99. 
[14] Account by Mr. George Atcheson Jr., Second Secretary of the American Embassy, who was a passenger; report of Court of Inquiry held by order of Admiral Yarnell on Board U.S.S. Augusta off Shanghai 23 Dec. 1937, printed in Foreign Relations, Japan 1931-1941 I 532-47. 
[15] Same, p. 559; Grew Ten Years in Japan pp. 232-42. The allegations of Hashimoto's responsibility were obtained by Mr. Hallert Abend of the New York Times and other American newspaper correspondents, and transmitted to me by Admiral Yarnell in 1947. Note: But for an excellent Japanese account of this affair, see Commander Okumiya "How the Panay Was Sunk," U.S. Naval Institute Proceedings pp. 587-96 (June 1953). The author, whose plane squadron led the dive-bombing attack, makes out a good case for the fliers who neither recognized Panay nor were informed of the gunboat's presence in the vicinity. The strike was made on the basis of army intelligence, not on the orders of Colonel Hashimoto; the Japanese naval aviators thought they were bombing enemy troops escaping up-river in Chinese merchant ships. 
[16] The vote was about 3 to 1 for complete withdrawal in eight West Central States; 2 to 1 in New England and the Pacific Coast. American Institute of Public Opinion, 16 Jan 1938.