(AP) -- Some e-mails purporting to be from the Homeland Security Department's intelligence division were fake and contained malicious software.

The e-mails actually originated from Internet addresses in Latvia and Russia, according to a three-page alert from the Homeland Security Department's counterintelligence unit. The document was obtained by The Associated Press.

These fake e-mails were sent to officials in the Defense Department and to state and local officials since June. The spyware appears to be criminal, according to the alert. But counterintelligence officials "cannot discount that targeting of DHS partners and DoD personnel may be for other purposes."

The e-mails were made to look as if they had actual text from a department intelligence assessment. They included links embedded with spyware known for stealing banking data and protected passwords.

Homeland Security spokeswoman Amy Kudwa said anyone who receives an e-mail like this should not open the link and should report the e-mail to their technology departments.

©2009 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.