MADRID — The scene conveyed a First World precision: A 75-year-old Spanish priest, stricken with Ebola in Liberia, arrived in Madrid on a special military jet. A helicopter buzzed overhead as ambulances transported him for treatment. Expressing confidence in the preparations, a Spanish health official said the risk of the virus’s spreading was “virtually nil.”

There was just one problem: The city’s infectious disease center had been mostly dismantled as part of a government cost-cutting plan, and a temporary Ebola ward would have to be hurriedly constructed.

After the priest died on Aug. 12, the unit was closed again, and the same exercise repeated when a second Ebola-infected priest was airlifted from West Africa in September. He died two days later, and last week an auxiliary nurse who changed his diaper and helped clean his bed was found to have the disease.

That ad hoc, improvisational response to a deadly virus that has already killed more than 4,000 people in West Africa has underscored holes in the West’s readiness to confront a wider outbreak. The infection of the Spanish nurse, Teresa Romero Ramos, was the first case of the disease’s being transmitted outside Africa — arising even before a nurse in Dallas was given an Ebola diagnosis after caring for a patient there.

Together, the cases have raised urgent questions about the risks of the disease’s spreading even in developed countries, particularly among health care workers, and the role that the smallest of human errors may play in subverting elaborate safety measures.

Both of the nurses had been wearing protective gear, which can pose extreme risks of infection if removed improperly. Officials are investigating whether the Spanish nurse may have inadvertently touched her face while taking her suit off.

A team of European Union investigators has found fault in the layout of the Ebola ward, while Ms. Romero’s co-workers have said they were forced to remove their gear in a very small space, with limited room to maneuver, even as temperatures rose quickly inside the suit.

“You are sweating more, and you are anxious to get it off,” said Manuel Torres, a nurse who joined Ms. Romero in treating the first priest and is now a member of the team treating her.

Recriminations in Spain, like those in the United States, have been loud and swift, with blame aimed variously at cost cuts, inadequate training and safety protocols, government officials, and the nurse herself.

Protesters stood outside the Health Ministry on Monday chanting for the resignation of Ana Mato, the national health minister. Facing complaints that the national government had acted too slowly, Prime Minister Mariano Rajoy created a special commission on Friday to oversee readiness and investigate how Ms. Romero became infected.

“This is an incredibly important moment, not just for Spain but for Europe and the United States,” said Dr. Julián Ezquerra, general secretary of Amyts, a large union of physicians in Madrid. “This is the first case of Ebola that has been generated outside Africa. We need to know what went wrong.”

For now, Ms. Romero, 44, remains in critical condition, if showing tentative signs of improvement, housed on the sixth floor of the same hospital, Carlos III, where the two priests were cared for.