Spain sold 4.88 billion euros ($6.18 billion) of 12- and 18-month T-bills on Tuesday, passing the first test of market appetite for its debt since a two-notch sovereign rating downgrade on Friday.

The Treasury aimed to raise between 4 and 5 billion euros from the sale, at which the yields fell to 2.049 percent and 2.399 percent, respectively.

A local broker had predicted the 12-month bill would sell for around 2.30 percent and the 18-month for 2.35 percent.

The last time the maturities were sold in mid-December, the yields were 4.050 percent and 4.226 percent, respectively.

That sale took place before the European Central Bank fed commercial lenders with nearly half a trillion euros of cheap three-year money.

Credit agency Standard & Poor's cut Spain's rating by two notches on Friday in a move priced in by markets that was part of a wave of downgrades of euro zone sovereign debt.

($1 = 0.7891 euros)

(Reporting by John Stonestreet; Editing by Sonya Dowsett)