WASHINGTON — Katherine Archuleta, the director of the Office of Personnel Management, resigned under pressure on Friday, one day after the government revealed that two sweeping cyberintrusions at the agency had resulted in the theft of the personal information of more than 22 million people, including those who had applied for sensitive security clearances.

Ms. Archuleta went to the White House on Friday morning to inform President Obama that she was stepping down immediately. She said later in a statement that she felt new leadership was needed at the federal personnel agency to enable it to “move beyond the current challenges.”

Her resignation marked a swift reversal but did little to calm the aftershocks of the disclosure this week of what appears to be the largest cybertheft affecting the federal government. On Thursday, Ms. Archuleta insisted in a conference call with reporters that she would stay on to address the vulnerabilities that led to the breach.

Both attacks are believed to have originated in China, but administration officials have declined to name a culprit.