A federal judge approved an immunity deal Friday allowing former Justice Department aide Monica Goodling to testify before Congress about the firing of eight federal prosecutors.

Goodling, who served as the department's White House liaison, has refused to discuss the firings without a guarantee that she will not be prosecuted. Congress agreed to the deal, Justice Department investigators reluctantly agreed not to not oppose it and U.S. District Judge Thomas Hogan gave it final approval Friday.

"Monica Goodling may not refuse to testify," Hogan began his brief order, which said that Goodling could not be prosecuted for anything other than perjury in connection with her testimony.

Lawmakers want to question Goodling as part of an inquiry into whether the Justice Department played politics with the hiring and firing of department officials. What began as an inquiry into whether U.S. attorneys were fired for political reasons has grown to include the role of the White House in the firings and whether the Justice Department officials misled Congress about them.

Goodling's lawyer has said that, with an immunity seal, she would cooperate and testify honestly.