Brazilian side Gremio took a step towards the Copa Sudamericana quarterfinals by beating Barcelona 1-0 in Ecuador in the first leg of their last-16 tie.

In the last minute of the first half, Werley headed an Elano free-kick into the back of the net for what proved to be the only goal.

However, it was not easy for Wanderley Luxemburgo's side as defender Tony was sent off on the hour mark when he was shown a second yellow card.

Barcelona went towards the equalizer but unsuccessfully, as they had little chance to clinch it because Leo Gago, Edilson and Marquinhos came off the bench to stop the hosts' attacks.

And they had a scary moment when Leo Gago cleared a Jose-Manuel Ayovi header off the line in injury time.

Barcelona will attempt to turn the tie around in the return leg on October 24 in Porto Alegre, with the winners facing Brazil's Palmeiras or Colombian side Millonarios in the next round.

Gremio forward Kleber told Globoesporte.com: "It was a great win in a tough match. We did not play well tonight. However, we clinched an important lead."

Meanwhile, another clash between Ecuadorian and Brazilian teams saw Liga de Loja and Sao Paulo draw 1-1.

The Brazilian team went ahead in the 36th minute as Jimmy Bermudez headed the ball into the back of his own net from an Osvaldo cross from the left.

Pedro Larrea leveled the match eight minutes later for Liga.