Spanish Prime Minister Mariano Rajoy said on Friday he did not rule out tapping the European Central Bank's bond-buying program for troubled euro zone governments but said Spain did not expect to have to ask for aid for now.

"We are not thinking of asking the European Central Bank to intervene and buy bonds in the secondary market," he said at a news conference in Madrid. "But we can't rule it out in the future."

Rajoy said ECB President Mario Draghi's bond-buying plan had had a calming effect on markets after a tumultuous year. Spain faced a tough year ahead, especially in the first half, he said.

(Reporting by Sonya Dowsett; Editing by Clare Kane)