WASHINGTON — Eric Shinseki resigned as secretary of the Department of Veterans Affairs on Friday, leaving behind a sprawling bureaucracy embroiled in scandal and burdened with a decades-old legacy of overwhelmed facilities and management failures that his successor must now confront.

President Obama announced Shinseki’s departure after a 45-minute Oval Office meeting between the two men that ended a week of mounting demands from both parties for the secretary to step down. Obama, who appeared pained at the turn of events, hailed Shinseki as having an unquestioned commitment to the nation’s veterans, but he said the political storm had made Shinseki’s continuing leadership untenable.

“We don’t have time for distractions,” Obama said. “We need to fix the problem.”

Fixing the problem at the department now becomes an urgent political matter for the president, once again raising questions about whether the candidate who pledged in 2008 and 2012 to make government work efficiently has lost grasp of the government he now leads.

    Most Read Stories

The department’s troubles remain a far more serious concern for the millions of veterans whose access to timely health care has been eroding as waves of wounded soldiers from Iraq and Afghanistan have converged with those who returned from earlier wars.

Most of the veterans now seeking treatment at department facilities are aging Vietnam-era service members, many with chronic illnesses such as diabetes that require long-term care or with cancer and cardiovascular disease that require complicated and expensive treatment. Veterans of Iraq and Afghanistan are further straining the system with mental-health problems such as post-traumatic stress disorder.

Veterans’ demand for medical services is soaring. The number of outpatient visits to VA health-care facilities has grown 26 percent in the past five years, to 94.6 million in the current fiscal year, according to the department. In the same period, the number of staff doctors and nurses has grown 18 percent.

The effort to resolve the fundamental problems at the department will also play out in Congress, where Republicans say the problem is not a lack of money — the department’s $154 billion annual budget has more than doubled since 2006 — but rather inefficiencies in the delivery of care. Democrats say the problem is a serious shortage of doctors and not enough hospitals.

“This is going to be a slow grind,” a senior administration official said of the need to overhaul the department. “A lot of the problems, they are not just systemic, but they are chronic. It’s like, roll up your sleeves, start digging into the culture and get rid of people who are impeding necessary change.”

Added the official, who asked for anonymity: “It won’t be pretty.”

One immediate question is whether the firing of Shinseki will have any real impact on the agency’s problems. Shinseki apologized in a speech Friday, before Obama accepted his resignation, saying he was “too trusting” of some people working for him. He criticized a “systemic, totally unacceptable lack of integrity” at some veterans health-care centers that he said he could not explain.

Defenders of Shinseki, 71, point out that problems at the Veterans Affairs Department, the country’s largest health-care system, were far worse during the Vietnam era. Despite the current problems, many veterans say the quality of care delivered — once they are able to get into the system — is much better today.

In addition, the veterans agency has a history of innovation in its health-care programs, including advances in the treatment of spinal-cord injuries, improvements in artificial limbs, increased use of electronic health records and the investigation of medical errors.

At the morning meeting with Obama, Shinseki and Rob Nabors, a White House official the president temporarily assigned to work with the VA, confirmed that an internal audit had found misconduct at more than 60 percent of 216 VA clinics and hospitals across the country.

“This is totally unacceptable,” Obama said at the news conference afterward. “All veterans deserve the best. They have earned it. Last week, I said that if we found misconduct, it would be punished, and I meant it.”

But the problems described in the internal audit were remarkably similar to those documented six years ago in a report to the department by Booz Allen Hamilton, the management-consulting company. The Booz Allen report found “chronic delays in care” at veterans hospitals and clinics, resulting in part from “the current shortage of nurses, nurse practitioners, primary-care providers and specialty physicians.”

Shinseki had been challenged by some of those problems during his five years at the department’s helm. A year ago, he and Obama had what aides described as a “come to Jesus” meeting in which the president demanded Shinseki deal with a huge backlog of disability claims that were delaying benefits to veterans.

But the recent allegations that officials manipulated waiting lists for thousands of veterans across the country exposed even bigger issues. The department’s internal audit, which Shinseki presented to the president Friday, attributed the scheduling scandal to the agency’s “overarching environment and culture, which allowed this state of practice to take root.”

The audit said the department’s culture “must be confronted head-on if it is to evolve to be more capable of adjusting systems, leadership and resources to meet the needs of veterans and families.”

The seeds of Shinseki’s departure may have been planted years ago, when he established standards that his supporters said were admirable but unrealistically high. He set 125 days as the goal for processing disability claims and was then blamed for the backlog that ensued. For new patients, he required that veterans to be seen within two weeks.

In the audit, that 14-day standard was singled out as an “organizational leadership failure” and a major problem in providing timely care, second only to a shortage of doctors.

In announcing Shinseki’s departure, Obama said a number of department officials, including in Phoenix, the medical center that spawned the current scandal, would be fired. He also said bonuses would not be paid to senior VA health-care executives.

Now, the challenge for Obama will be finding someone who has the ability not just to lead a department with nearly 300,000 employees, but also steer it in a new direction. Obama said Friday that Sloan Gibson, Shinseki’s deputy and the president’s choice to be the acting secretary, will not lead the department in the long run.

“There is a need for a change in culture within the VHA,” Obama said, referring to the Veterans Health Administration, “and perhaps the VA as a whole, that makes sure that bad news gets surfaced quickly so that things can be fixed.”

Gibson, 61, a U.S. Military Academy graduate who joined the department just three months ago, most recently served as chief executive officer of the USO.

Before his USO stint, Gibson spent more than two decades in banking in cities including Charlotte, N.C.; Atlanta; Nashville; and Birmingham, Ala.

The son of a member of the Army Air Corps who served as a B-17 tail gunner during World War II, Gibson graduated from West Point in 1975 and later earned a master’s degree in economics from the University of Missouri, Kansas City, and a master’s in public administration from Harvard.

Among the names mentioned as Shinseki’s possible successors by lawmakers and officials at veterans organizations are Kenneth Kizer, who was undersecretary of veterans affairs from 1994 to 1999; Rep. Tammy Duckworth, D-Ill., a veteran who served as assistant secretary at the department; Sen. Jon Tester, D-Mont.; and Jim Webb, a veteran who was a Democratic senator from Virginia and a secretary of the Navy.

The president may also face a difficult time getting Congress to agree on legislation and financing to make the necessary changes. Democratic and Republican lawmakers have demonstrated vastly different visions for reforming the department.

Speaker John Boehner said Friday that, “Until the president outlines a vision and an effective plan for addressing the broad dysfunction at the VA, today’s announcement really changes nothing.”

Material from The Associated Press and the McClatchy Washington Bureau is included in this report.