The nurse had treated two Spanish missionaries who died of the disease after being flown home from the region.
Three other people, including the nurse’s husband, have been quarantined.
The European Commission has asked Spain to explain how the nurse could have become infected.
Some 3,400 people have died in the outbreak – mostly in West Africa.
The Spanish auxiliary nurse, a 40-year-old woman who has not been named, was one of about 30 staff at the Carlos III hospital in Madrid who had been treating priests Manuel Garcia Viejo and Miguel Pajares, officials say.
Manuel Garcia Viejo, 69, died at the hospital on September 25 after catching Ebola in Sierra Leone. Miguel Pajares, 75, died in August after contracting the virus in Liberia.
The nurse had twice gone into the room where Manuel Garcia Viejo had been treated, to be directly involved in his care and to disinfect the room after his death. Both times she was wearing protective clothing.
Madrid healthcare director Antonia Alemany told reporters that according to the information available: “The nurse went into the room wearing the individual protection gear and there’s no knowledge of an accidental exposure to risk.”
Shortly afterwards the nurse went on holiday, a hospital spokesman said, but fell ill on September 30 and was admitted to Alcorcon hospital in south-west Madrid on October 5 after being tested positive for Ebola.
Early on Tuesday she was moved under police escort to Carlos III hospital in the capital and is said to be in a stable condition.
The Spanish health authorities say she is being treated with a drip using antibodies from previous Ebola patients.
Her husband and a second nurse who treated the missionary are now in quarantine, officials said, as well as a man who recently arrived on a flight from Nigeria.
Doctors are also monitoring 22 people who the nurse had contact with at Alcorcon hospital, and 30 people working at Carlos III, according to health sources quoted by Spanish newspaper El Pais.
They include an ambulance crew, and doctors and nurses, and have all been contacted by the health authorities.
It was not clear where the nurse had gone on holiday.
It is also unclear how she could have contracted Ebola.
The hospital was reported to have had extreme protective measures in place including two sets of overalls, gloves and goggles.
However, health workers told El Pais newspaper that the clothing did not have level-four biological security, which is fully waterproof and with independent breathing apparatus.
Instead it was level two, the paper says, as photographs provided by staff indicated that the overalls did not allow for ventilation and the gloves were made of latex and bound with adhesive tape.
6Baf0uRXPKcImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…