Image copyright Getty Images Image caption The Office of Personnel Management was the target

The US says it faces a "dedicated adversary" and an "ever evolving threat" to the nation's cyber security, after a major data breach.

The hacking of federal government computers may have compromised the records of four million employees.

US officials have blamed China for the attack, but the Chinese have denied any involvement.

Four million current and former US government employees are being told to take precautions.

They have been told to monitor or close bank accounts, freeze credit reports, and change online passwords.

Some have spoken to the BBC expressing fears over how their personal information will be used.

"Identity theft is one thing I'm concerned about," said Bryan Sivak, a former technology officer with the Department of Health and Human Services.

"But depending on what information was accessed, I'm more worried about this information being used to illegally access various networks or against individuals directly."

At a White House briefing on Friday, a spokesman said the US faced a "dedicated adversary", and the question of who carried out the attack was the focus of an ongoing FBI investigation.

Image copyright Getty Images Image caption The US says some Chinese hackers work in this Shanghai building

J David Cox Sr, president of the largest union representing federal employees, says he "will demand accountability" and push for the information to be secured.

Steve Hodge, a former employee of the Food and Drug Administration told the BBC that "if anyone had possession of this information, they could impersonate me".

The Office of Personnel Management (OPM) said it became aware of the breach in April during an "aggressive effort" to update its cyber security systems.

It said it would be offering those affected 18 months of free credit monitoring and identity theft insurance.

OPM serves as the human resource department for the federal government. The agency issues security clearances and compiles records of all federal government employees.

What was stolen?

sensitive data has been taken from current and former employees

security clearances and background checks dating back to 1985

social security numbers

performance reviews and testing

birthdays, addresses, bank information, and other personal data

An unnamed US official told the Reuters news agency that some of the stolen information includes security clearances and background checks from as far back as 1985.

Some of the sensitive personal information could be used to access critical weapons systems, according to the official.

Susan Collins, a member of the Senate Intelligence Committee, said the hackers were believed to be based in China.

But China denied there was any official involvement in the attack.

A spokesman for the Chinese embassy in Washington called the allegations "not responsible, and counterproductive".

US Senator John McCain, chairman of the Senate Armed Services Committee, said the hack proved the "inadequacy" of cyber strategy.

If China was to blame, then the US cannot "sit idly by", he added, and ways must be found to deter future attacks.

The White House spokesman said President Barack Obama has frequently raised China's activities in cyber space as a significant source of concern.