ALGIERS, Algeria — In what could be the first spillover from France’s intervention in Mali, Islamist militants attacked and occupied a natural gas complex partly operated by energy company BP in southern Algeria today. Two foreigners were killed and possibly dozens of others, including Americans, were taken hostage. A militant group claimed responsibility for the attack, saying it was in revenge for Algeria’s support of France’s operation against al-Qaida-linked Malian rebel groups far to the southeast. It said it was holding 41 foreigners, including seven Americans.