The home loan giant Freddie Mac has agreed to pay a record $3.8 million fine to settle allegations it made illegal campaign contributions.

The fine announced Tuesday is by far the biggest ever levied by the Federal Election Commission. Because the Federal Home Loan Mortgage Corporation, widely known as Freddie Mac, agreed to pay the fine and stop breaking the law, the FEC said it would not take further action against corporate officials.