Two former heads of US diplomatic security in Libya have told a congressional hearing that requests for additional agents to protect American officials and premises in the face of a growing threat from armed militias were rejected by the state department ahead of the attack on the Benghazi consulate that killed the US ambassador, Chris Stevens, and three other officials.

At a heated hearing before the House of representatives oversight committee, Republicans painted a picture of an incompetent state department failing to heed warnings of a growing terrorist threat or to prepare for a possible attack on the anniversary of 9/11, and then covering up the circumstances of the full scale militia assault that killed Stevens. They also accused Obama administration officials of attempting to suppress unclassified documents because they were politically embarrassing.

Democrats described the investigation as a partisan political move intended to embarrass the White House in the run up to the presidential election.

Hours before the hearing, the state department was forced into an embarrassing retreat on its claim that the attackers used the cover of a popular protest outside the consulate as cover for the assault. Officials acknowledged on Tuesday that there was no protest and that as it occurred on September 11 it was likely timed to mark the anniversary of al-Qaida's assault on the US 11 years ago.

The former head of embassy security in Libya, Lieutenant Colonel Andrew Wood, said that he recognised the situation in Libya was volatile and that he and other officials pressed for additional agents to protect the consulate in Benghazi.

"The security in Benghazi was a struggle and remained a struggle throughout my time there … Diplomatic security remained weak,'' he said. "The RSO (regional security officer) struggled to obtain additional personnel there, but was never able to attain the numbers he felt comfortable with."

The committee chairman, Darrel Issa, then released state department cables not previously made public containing the requests for more security including one from the then ambassador to Libya, Gene Cretz.

Another official, Eric Nordstrom, who was responsible for protecting US diplomats in Libya, said that he too sought additional resources. But he said he was told over the phone by a senior state department official responsible for handling the request, Charlene Lamb, not to make any more because "there would be too much political cost".

After that Republican members of Congress honed in on Lamb, who was also a witness, accusing her of failing to recognise the seriousness of the threat.

Lamb responded that the requests were for more personnel in Tripoli and it would have made no difference to how many security men would have been protecting the Benghazi consulate where protection was in any case mostly in the hands of a pro-government militia.

"We had the correct number of assets in Benghazi on the night of 9/11," Lamb testified.

However, Republican attempts to accuse the state department of leaving the consulate vulnerable by refusing requests for more security were delivered a blow when Nordstrom was asked how many agents he wanted to protect the Benghazi site. He said he asked for three. The hearing then heard that there were five at the time of the attack.

Congressman Jason Chaffetz noted that after the state department declined to increase the number of security personnel it did raise the danger pay of Wood and his colleagues.

Nordstrom suggested that it might have been difficult to protect the consulate in any circumstance.

"I had not seen an attack of such ferocity and intensity previously in Libya nor in my time with the diplomatic security service," he said. "I'm concerned that this attack signals a new security reality, just as the 1983 Beirut marine barracks bombings did for the marines, the 1998 East Africa embassy bombings did for the state department and 9/11 did for our entire country."

But Nordstrom warned that it would be wrong to react to the attack and the continuing threat by retreating to a bunker.

Republican congressmen hammered away at the accusation that the state department had failed to heed warnings of an escalating threat and that officials gave "demonstrably false statements" about the circumstances of the attack.

The committee released a memo from Stevens sent on the day he was killed in which he described an array of armed militias competing for control and some of their leaders as criticising the US for taking political sides by backing the government in Tripoli. He also described growing Islamist influence in the town of Derna, to the east of Benghazi.

However the memo also reported that Benghazi council said the security situation was improving and appealed for American investment.

Nordstrom described a chaotic situation in Libya shortly after the revolution, saying that the new government had so little control that it could not provide security for diplomats and embassies.

"We could not rely on the Libyan government for security, intelligence and law enforcement help to identify emerging threats or to ask them for assistance in mitigating those threats. In Benghazi however, the government of Libya through the 17 February Martyrs Brigade was able to provide us consistent armed security since the very earliest days of the revolution," he said.

Nordstrom said that the long-term plan was to create a local force to protect the consulate.

Issa accused the administration of a cover-up of the circumstances of the attack because for days the administration stuck with the claim that the attack was made under the cover of a popular protest against an anti-Islam film.

One witness, assistant secretary of state Patrick Kennedy, defended the US ambassador to the UN, Susan Rice, who has faced calls to resign for her statements in the days after the attack saying it was a response to an anti-Muslim video that prompted demonstrations across the Middle East.

Kennedy said Rice based her assertion on the best information she had at the time and hinted that it came from the intelligence services but said he could not discuss it in public.

The hearing at times degenerated into a spat over what is classified information after Chaffetz attempted to prevent Kennedy speaking about exactly who was protecting US officials and premises in Libya on the grounds he was revealing classified information. He also objected to a satellite image readily available on Google.

A Democratic member of the committee, Stephen Lynch, expressed astonishment, saying that Chaffetz had pressed for the hearing specifically to air accusations that the state department had not provided sufficient security.

The mother of one of the Americans killed in the Benghazi attack, Glenn Doherty, has accused Mitt Romney of using her son's death for political ends.

"I don't trust Romney," Barbara Doherty told a Boston television station, WHDH. "He shouldn't make my son's death part of his political agenda. It's wrong to use these brave young men, who wanted freedom for all, to degrade Obama."