WASHINGTON (CBS) — Former FBI director James Comey said Sunday he will comply with a congressional subpoena from the House Judiciary Committee for a closed-door hearing on the FBI’s actions during the 2016 election. Comey initially went to court to fight it.

“Grateful for a fair hearing from judge. Hard to protect my rights without being in contempt, which I don’t believe in,” Comey said in a tweet. “So will sit in the dark, but Republicans agree I’m free to talk when done and transcript released in 24 hours. This is the closest I can get to public testimony.”

READ MORE: San José School District Secures Vaccine for Entire Workforce
Former FBI Director James Comey

Former FBI Director James Comey is sworn in during a Senate Intelligence Committee hearing on Capitol Hill, June 8, 2017, in Washington. (AP Photo/Alex Brandon)

A committee aide confirmed Comey will appear before lawmakers this week and the interview will be transcribed. According to his attorney David Kelley, Comey has agreed to sit for a voluntary interview on Dec. 7. The committee will give Comey a full transcript of that testimony within 24 hours, which he is free to make public.

READ MORE: Golden Gate Fields Races to Make Up for Missed Vaccine Appointments

In exchange for agreeing to testify, the committee will drop the subpoena. “Mr. Comey will join us for a closed-door transcribed interview later this week,” Committee Chairman Bob Goodlatte said in a statement. “We will release the transcript of his interview to the public as soon as possible after the interview, in the name of our combined desire for transparency.”

READ MORE AT CBS NEWS

MORE NEWS: Study Shows Stockton Universal Basic Income Experiment Led to Increased Employment

© 2018 CBS Interactive Inc. All Rights Reserved