WASHINGTON — Michael T. Flynn, the former national security adviser, has offered to be interviewed by House and Senate investigators who are examining the Trump campaign’s ties to Russia in exchange for immunity from prosecution, according to his lawyer and a congressional official.

But the congressional official said investigators were unwilling to broker a deal with Mr. Flynn — who resigned last month for misleading White House officials about his contacts with Russia’s ambassador to the United States — until they are further along in their inquiries and they better understand what information Mr. Flynn might offer as part of a deal.

In a statement on Thursday evening, Mr. Flynn’s lawyer confirmed discussions with the House and Senate intelligence committees about possible testimony by his client. The lawyer, Robert Kelner, did not provide specifics about the terms under which Mr. Flynn would testify, but said that “no reasonable person, who has the benefit of advice from counsel, would submit to questioning in such a highly politicized, witch-hunt environment without assurances against unfair prosecution.”

“General Flynn certainly has a story to tell, and he very much wants to tell it, should circumstances permit,” the statement said.