Mortgage giant Freddie Mac (FRE) entered an indemnification agreement with three executive officers, protecting the officers from any liabilities and expenses in connection to any threatened or pending lawsuits.

The agreement, announced Friday in a Securities and Exchange Commission filing, is effective as of Sept. 6, 2008, two days before Freddie and Fannie Mae (FNM) were seized by the government, after they saw their portfolios suffer amid rising foreclosures and exposure to subprime mortgages.

The obligations to the executives include any attorneys' fees and will continue even after a director or officer has left the company.

The executives include Michael Perlman, executive vice president of operations and technology; Acting Chief Financial Officer David B. Kellermann; and Michael C. May, senior vice president of multifamily.

In the filing, Freddie said any liabilities or expenses incurred due to willful misconduct or knowing violation of criminal law are excepted from the agreement, Freddie said.

Shares of Freddie were up 3 cents, or 8.3%, to 39 cents in after-hours trading. The company's stock has plummeted 99% from a 52-week high of $34.22 in March.

-By John Kell, Dow Jones Newswires; 201-938-5285; john.kell@dowjones.com