(CNN) - Following heated exchanges with House Republicans, IRS Commissioner John Koskinen on Wednesday told a congressional committee that he will hand over all of the emails of Lois Lerner, the former IRS official under investigation for the agency's targeting of conservative groups.
But Koskinen also told frustrated Republicans that producing all the documents the committee wants will take "years," indicating that the matter is far from settled.
"If you want them all, I will give them all to you," Koskinen told the House Oversight Committee, which has subpoenaed every email from the IRS accounts of Lerner and a handful other staffers connected to the investigation.
Lerner oversaw the division determining tax-exempt status and retired after an inspector general's report found it used inappropriate methods when looking at conservative and other groups.
The agreement to hand over all of her emails is a new position for the IRS and came only after members had repeatedly demanded a firm yes or no on the issue.
Koskinen has previously said the agency would cooperate with the investigation, but until now the agency has limited the documents to those found using certain search terms, like "tea party," related to the investigation.
But by expanding to include every Lerner email, Koskinen warned lawmakers the effort will take enormous amounts of time. That is because the agency is restricted by law from divulging taxpayers' confidential details.
To ensure no accidental disclosure, Koskinen said the IRS is must go through Lerner's emails one-by-one to redact any such information before sending them to the committee.
"My guess is there is no way to get this information before the end of the year," the IRS chief said of the emails.
He later added that gathering all the information so far subpoenaed by the committee, including applications for tax exempt status, could take "years."
"This commissioner has no intention of complying with this duly issued subpoena!" fired out Rep. Jason Chaffetz, a Utah Republican. "When you have a duly issued subpoena, you comply with it."
The tense battle over email goes to the heart of the Republican investigation of IRS targeting of conservative groups.
Oversight Committee Chairman Darrell Issa, a California Republican, is trying to determine if political targeting was ordered from Obama administration officials outside the IRS, and he has focused on Lerner as a central figure.
During the committee's nearly year-long investigation, Lerner has repeatedly cited her Fifth Amendment right against self-incrimination. Issa disagrees with her over whether she waived that right and is considering filing contempt charges.
But as Republicans try to force Lerner to testify, they have also doggedly sought all of the documents she left behind at the IRS.
"I know you want to bring this investigation to a close as soon as possible," Issa told Koskinen. "And I do, too, but they only way you can do that is to comply with our request (to hand over all the e-mails)."
But Koskinen returned again and again to the scope of the committee's subpoena.
"In a court of law, when presented with that subpoena, a judge would not enforce it," he said.
The IRS chief said the search could produce over a million pages of emails, with most of them being irrelevant to the investigation.
Republicans dismissed his argument.
"What part of 'all' do you not understand?" asked Rep. Jim Jordan, an Ohio Republican. "With all respect, we don't care what you think is relevant. We want them all."
The IRS has so far turned over more than 400,000 pages of documents for the investigation and planned to give the committee an additional 25,000 on Wednesday.
Koskinen said that the agency is still going through the more limited group of Lerner's emails, found by looking for specific search terms. Once that is done, he said, the IRS can start looking through her entire Inbox.
"You are going to get a lot of emails," Koskinen told the committee.
The stated agreement to handover emails did little to satisfy Republicans, who expressed continued skepticism that they would see the documents.
"I can tell you, the people I represent, they believe you are stonewalling," said Rep. Mark Meadows, a North Carolina Republican.