Facebook today said that it has struck a one-year partnership with security giant McAfee to better stamp out spam and malware from the world's biggest social network.

Through the exclusive arrangement, McAfee (NYSE: MFE) is offering Facebook users a free six-month subscription to its security product, and a discounted rate after the trial expires.

The two companies partnered to develop a custom suite of security tools, including a software application, a scanning and repair tool and a spate of education materials to promote safe computing practices.

"For the rare case in which an account is compromised, we've developed a unique process that requires the account owner to take steps to secure the account and learn security best practices," Facebook project manager Jake Brill wrote in a blog post explaining the partnership. "We've also incorporated custom McAfee software into this process for people identified as having infected computers."

Facebook, like other social sites, has come under frequent and occasionally severe cyber attacks, including the infamous Koobface worm that began targeting the site in 2008.

Through the partnership announced today, McAfee has become Facebook's exclusive provider of security tools. In the event that a person's Facebook account is compromised, Facebook said it will initiate a free McAfee security sweep to restore the account and clean the user's computer.

Facebook said that it will not take any revenue from the subscriptions it refers to McAfee, pledging instead to reinvest that money into its security apparatus.

"We invest in dedicated teams and advanced technical systems that detect and block suspicious behavior," Brill said. "When we find a message with a link to a fake login page or other malicious Web site, we prevent it from being sent and delete all instances of it from the site. We also work with third parties to get malicious sites added to browser blacklists or removed completely."

McAfee is promoting the free security trial on its Facebook page.

The custom security suite is initially rolling out to users in the United States, Canada, Mexico, Brazil and several countries in Europe. Facebook said it will expand to additional markets throughout the first quarter of this year.

Kenneth Corbin is an associate editor at InternetNews.com, the news service of the internet.com network.