The US director of national intelligence, James Clapper, has attempted to head off criticism that he lied to Congress over the extent of government surveillance on American citizens, with a letter to senators in which he apologised for giving "erroneous" information.

Two weeks after telling NBC news that he gave the "least untruthful answer possible" at a hearing in March, Clapper wrote to the Senate intelligence committee to correct his response to a question about whether the National Security Agency "collected data on millions of Americans".

But the US senator who asked the question, Ron Wyden, said on Monday that Clapper's office had admitted in private that his answer was wrong, after the March hearing. Yet the intelligence chief only corrected the record on 21 June, when disclosures by the former NSA contractor Edward Snowden prompted weeks of intense public pressure.

"Senator Wyden is deeply troubled by a number of misleading statements senior officials have made about domestic surveillance in the past several years," said his spokesman, Tom Caiazza. "He will continue pushing for an open and honest debate about programs and laws that touch on the personal lives of ordinary Americans."

In the March hearing, Wyden grew frustrated that he could not get a "direct answer" from Clapper about a question the senator said he had been posing to the intelligence agencies in a series of letters for a year: when do US spies need a warrant to surveil Americans' communications?

"What I wanted to see is if you could give me a yes or no answer to the question: does the NSA collect any type of data at all on millions or hundreds of millions of Americans," Wyden asked Clapper.

He responded: "No, sir, not wittingly. There are cases where they could inadvertently, perhaps, collect, but not wittingly."

After Snowden's disclosures in the Guardian threw a spotlight on Clapper's statement, he gave an interview to Andrea Mitchell of MSNBC, portions of which were first broadcast on 9 June. In the interview, Clapper explained the apparent inconsistency as a ploy to avoid revealing classified information.

On 18 June, Senator Rand Paul, Republican of Kentucky, accused Clapper directly of lying, pointed out that lying on oath to Congress was a crime, and questioned whether he could continue in his position.

According to the latest revelation in the Washington Post on Monday, and confirmed by an Obama administration official, Clapper wrote to the Senate intelligence committee on 21 June, when he admitted directly that his answer was wrong. "My response was clearly erroneous – for which I apologize," Clapper said in the letter.

Clapper appeared to row back from his MSNBC statement that his March answer was calculated to avoid betraying confidential information. In the letter, Clapper said that he had misunderstood the question.

But Clapper did not say in the letter why he had taken him until June to correct the mistake. Senator Wyden's spokesman made it clear on Monday that the senator had made attempts to get Clapper to correct the record before the revelations in the Guardian, but was rebuffed. "Senator Wyden had a staff member contact the Office of the Director of National Intelligence on a secure phone line soon after the March hearing to address the inaccurate statement regarding bulk collection on Americans.

"The ODNI acknowledged that the statement was inaccurate but refused to correct the public record when given the opportunity. Senator Wyden's staff informed the ODNI that this was a serious concern.

"Senator Wyden continued to raise concerns about the government's reliance on secret law in the weeks following the hearing, prior to the Guardian publishing its first story several weeks later."

A spokesman for the Office of the Director of National Intelligence said on Monday: "Director Clapper has deep respect for the role of our oversight committees in both keeping our nation safe and ensuring the privacy of all Americans are protected. The intelligence community will continue to work all members of Congress to ensure the proper balance of privacy and protection for American citizens."

In his MSNBC interview, Clapper said he believed Wyden's question was unfair, akin to asking him when he was going to stop beating his wife. "So I responded in what I thought was the most truthful, or least untruthful manner by saying no," Clapper said.

In the later letter to the intelligence committee, Clapper acknowleded the "heated controversy" over his remark, and said he had misunderstood the original question. "I have thought long and hard to re-create what went through my mind at the time," Clapper said in the letter, according to the Washington Post.

Wyden led bipartisan group of 26 senators who wrote to Clapper last week to complain that the administration is relying on a "secret body of law" to collect massive amounts of data on US citizens.

The senators, including four Republicans, also accused intelligence chiefs of making a number of misleading statements which prevented proper public debate on the subject.

"We are concerned that by depending on secret interpretations of the Patriot Act that differed from an intuitive reading of the statute, this program essentially relied for years on a secret body of law," they said.

"This and misleading statements by intelligence officials have prevented our constituents from evaluating the decisions that their government was making, and will unfortunately undermine trust in government more broadly."