BARCELONA, Spain (AP) Rafael Nadal avenged last year's loss to Nicolas Almagro by beating his fellow Spaniard 6-3, 6-1 at the Barcelona Open on Wednesday, while U.S. Open champion Marin Cilic slumped to a second-round exit.

The second-seeded Nadal, who lost last week to Novak Djokovic in the Monte Carlo semifinals, rebounded with a solid performance to advance to the third round.

''The ups and downs that I had to start his season, I didn't have here. I played at a good rhythm throughout, and that is promising,'' Nadal said. ''I only need a little more velocity on my drive, but for the first day I have to be satisfied.''

Almagro hit 19 unforced errors to nine for Nadal in a first set that he ceded on a costly double fault.

Then, after a spectator proposed marriage to his girlfriend between sets, the former No. 1 broke Almagro to go up 3-1 and rolled on.

Almagro hustled to save four match points in a long final game that included Nadal saving seven break points before he finally clinched the match with an ace.

''I had in mind that I was playing against a rival who beat me here last year, and that was a plus,'' Nadal said. ''As a rival in the first round, it was the worst that I could have drawn. This was very positive, 6-3, 6-1 is a commanding win.''

Almagro upset Nadal on the same red clay court last year to end the eight-time champion's run of 41 consecutive wins at the tournament he has dominated for almost a decade.

Nadal next faces Fabio Fognini after the Italian rallied to beat Russian teenager Andrey Rublev 3-6, 6-4, 6-1.

Cilic lost to Victor Estrella of the Dominican Republic 6-4, 6-4. Estrella will next play Martin Klizan after the Slovak rallied past Juan Monaco 5-7, 6-0, 6-3.

Also, Marcel Granollers beat sixth-seeded Jo-Wilfried Tsonga 6-4, 6-2.

Santiago Giraldo of Colombia defeated Joao Sousa of Portugal 6-3, 3-6, 6-1, to reach a third-round meeting against top-seeded Kei Nishikori, setting up a rematch of last year's final won by the Japanese.

In a match between 19-year-olds, Sweden's Elias Ymer won 2-6, 7-5, 7-6 (6) against Australia's Nick Kyrgios in just under two-and-a-half hours.

Ymer will play third-seeded David Ferrer, who brushed aside Albert Montanes 6-2, 6-3.

Feliciano Lopez outlasted Marsel Ilhan 6-2, 5-7, 7-6 (5). Lopez will face Pablo Andujar, after he roared back to oust 11th-seeded Leonardo Mayer 2-6, 6-1, 6-2.

Philipp Kohlschreiber eliminated Andrey Kuznetsov 7-6 (1), 6-3, advancing to play Benoit Paire after he rallied 1-6, 6-2, 6-3 against Ernests Gulbis.

In the day's biggest upset, Estrella broke Cilic four times, stealing his serve to go ahead 5-4 in the second set and finishing off the ninth-ranked Croat by holding serve to love.

It was only Cilic's third tournament of the season after he rested to recover from a shoulder injury. As the fourth seed, he had a bye in the first round.

''I was not too happy with the way I played,'' Cilic said. ''I made a lot of unforced errors. I feel I still need several matches to get my form to a good stage.''

In a late match, Fabio Fognini of Italy rallied after going a set down to beat Andrey Rublev of Russia 3-6, 6-4, 6-1.