SEVILLE, Spain — There was no lifting of a winner's trophy this time for Lionel Messi.

The Barcelona star had to settle on receiving the runner-up plate from Spanish King Felipe VI after Valencia beat his side 2-1 in the Copa del Rey final on Saturday.

The defeat ruined Barcelona's chance to earn a second consecutive domestic double and an unprecedented fifth Copa del Rey in a row.

More importantly for coach Ernesto Valverde and players in question such as Philippe Coutinho, who again did little to help Messi in attack, the loss puts a disappointing finish to a season that just weeks ago was lined up for the treble.

"We weren't able to meet the expectations that we created," Valverde said. "A month ago we were celebrating the league title. Fifteen days ago we were thinking we had a chance at a treble. And we came up short in the decisive moments in both the Champions League and the Copa del Rey."

Barcelona's first defeat in the Copa since losing the 2014 final came two weeks after it suffered a stunning 4-0 turnaround at Liverpool in the Champions League semifinals, squandering in remarkable fashion a 3-0 first-leg win.

Like at Liverpool, defensive lapses doomed Barcelona to a 2-0 deficit by halftime.

Other than getting a lift from defender Gerard Pique, Barcelona was inspired again by Messi, who tried to almost singlehandedly win the game for them in the second half. The club's all-time greatest scorer hit the woodwork before scoring in the 73rd minute when he put in a rebound of a save by Valencia goalkeeper Jaume Doménech. But his best effort to force added time was an off-target header with five minutes remaining.

Valencia's eighth Copa del Rey title and first since 2008 capped the celebrations of its 100th anniversary since its founding. After a poor start to the season, it came on strong and set a club record with 17 matches in a row without a loss en route to reaching fourth place in the league to clinch a Champions League berth. It also made the Europa League semifinals.

"I am so happy. I have been with the club for eight years and have been through some tough moments. This club deserves more moments like this," said a tearful Dani Parejo, who helped Valencia dictate the match until he was substituted for a right leg injury.

With Luis Suárez and Ousmane Dembele injured, Valverde aligned Sergi Roberto, who normally plays at right back, next to Messi and an uninspired Coutinho.

The result was a toothless team that relied on Messi to generate almost all of its attack.

Valencia needed more than four minutes before it could complete consecutive passes, but its first attack was inches away from producing a goal if not for the timely intervention of Pique, who rushed back to clear Rodrigo Moreno's shot from the line.

There was no stopping Kevin Gameiro's shot from just inside the edge of the area in the 21st when Gabriel Paulista sent a long ball to José Gayá breaking unmarked down the left flank. Gayá found Gameiro, who used one touch to dodge the tackle of Jordi Alba before firing home.

With Barcelona in disarray, Rodrigo made it 2-0 in the 33rd when Parejo broke Barcelona's pressure, and launched Carlos Soler, who sprinted past Alba and sent a pin-point cross right to the head of Rodrigo.

Barcelona improved after Valverde sent on midfielder Arturo Vidal and forward Malcom for the second half for Nelson Semedo and Arthur, who have recently returned from injury.

Messi hit the far post in the 56th, then scored when Doménech did well to parry a header by Clement Lenglet from a corner by Malcom. The ball fell to Messi to finish off his 51st goal of the season.

"Anytime you win a league title, you have to call it a good year," Pique said. "(But) we finish the season with a bittersweet sensation.

"We are FC Barcelona and have the obligation to win all competitions. We have to congratulate Valencia and look to start next season even stronger."

___

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports