claim a first-team spot, facing tough competition from the likes of David Albelda and Rubén Baraja, manager Quique Sánchez Flores' preferred duo; still, he featured in 19 league games, and displayed some flashes of talent that allowed him to preserve his place in the Portugal national squad. In a bid to secure first-team football, Viana decided to join fellow La Liga side CA Osasuna on loan, on 13 July 2007. However, a serious injury during pre-season forced him out for four months. After recovering, he played all of the last three matches, helping to a narrow escape from relegation. In the 2008–09 campaign, Viana took no part in manager Unai Emery's plans, being restricted to four UEFA Cup matches and two appearances in the Copa del Rey. Braga On 31 July 2009, Viana was loaned to S.C. Braga for one season, thus returning to Portugal after three years. As they led the league in its early stages, he scored his first goals upon returning to his country, hitting twice in a 3–1 home win over C.F. Os Belenenses on 30 August. On 31 October, he again found the net, from a free kick against S.L. Benfica in a 2–0 home victory where he received player of the match accolades. The Minho side eventually finished in a best-ever second place, losing the title to precisely this team in the last matchday, with the player making 28 appearances (six as a reserve, he lost his importance after the return of Uruguayan Luis Aguiar on loan). Viana regained his starting position in 2010–11 under the same manager, Domingos Paciência, as Aguiar eventually leaving the club. On 6 March 2011, again from a direct free kick and against Benfica, he equalised for the hosts in an eventual 2–1 home win. He added nine games (all starts) in Braga's UEFA Europa League runner-up run. On 27 November 2011, in a game against FC Porto, Viana displayed a white T-shirt with the words 'Gary – Rest In Peace', in a tribute to Speed, who had committed suicide earlier that day. Al Ahli and Al-Wasl On 5 June 2013, Al Ahli Club from Dubai announced the signing of Viana effective as of 1 July, when his contract with Braga expired. He made his debut on 30 August in the year's Arabian Gulf Super Cup at the Mohammed Bin Zayed Stadium, a penalty shootout victory after a goalless