Valencia has finally won again in the Spanish league, beating Espanyol 2-1 to end a three-month drought and move further from the relegation zone.

Martin Montoya scored from close range in the 17th minute and Santi Mina sealed the victory in the 73rd at Mestalla Stadium as Valencia snapped its eight-game winless streak to open a four-point gap to the relegation teams.

Valencia still has a game in hand, at home against leader Real Madrid.

David Lopez netted for Espanyol in the 85th but Valenca held on to earn the elusive victory.

Valencia hadn't won in the league since a 2-1 result at Sporting Gijon in October, in what was the first match in charge for Cesare Prandelli, the former Italy coach who resigned during the winter break because of the team's struggles.

The traditional Spanish club was yet to win this year. It had lost both of its Copa del Rey matches to Celta Vigo 6-2 on aggregate in the Round of 16.

In its previous league match, it was ahead of last-place Osasuna until the final minutes when it missed a late penalty kick and then conceded an injury time equalizer for a 3-3 result.

Owned by Singapore investor Peter Lim since 2014, Valencia is the most recent team other than Madrid, Barcelona and Atletico Madrid to win the league title, in 2004.

Leader Madrid plays at third-place Sevilla later on Sunday. Barcelona moved to second place by beating Las Palmas at Camp Nou on Saturday, while fourth-place Atletico edged Real Betis 1-0 at home for its third-win in a row.