If it shot at you first then it was definatly at war with you. Maybe you sank another American ship earlier on patrol? If you sink a neutral their country will be hostile towards you for the next 24 hours.
You can change the points given/removed for shooting enemies/neutrals in basic.cfg (I think). Because neutrals are not properly represented (running without lights at night, supplying weapons to Britian, etc) I changed mine to '0'. This way I still try to avoid sinking them but aren't punished if they get in my way

.