A couple of weeks ago, few questioned Ernesto Valverde as Barcelona coach.

The team had just won a second straight Spanish league title under his command and was close to making it to the Champions League final after beating Liverpool 3-0 in the first leg of the semifinals.

The team was also through to the Copa del Rey final, where it would try to win an unprecedented fifth straight title in the competition.

FC Barcelona's coach Ernesto Valverde gestures during a press conference at the Sports Center FC Barcelona Joan Gamper in Sant Joan Despi, Spain, Friday, May 24, 2019. FC Barcelona will play against Valencia in the Spanish Copa del Rey soccer match final on Saturday. (AP PhotoManu Fernandez)

FC Barcelona's coach Ernesto Valverde gestures during a press conference at the Sports Center FC Barcelona Joan Gamper in Sant Joan Despi, Spain, Friday, May 24, 2019. FC Barcelona will play against Valencia in the Spanish Copa del Rey soccer match final on Saturday. (AP PhotoManu Fernandez)

Valverde seemed to be comfortably in control as the club moved closer to winning the treble.

Things quickly took a turn for the worse, though, and Valverde woke up on Sunday under added pressure and facing increased criticism.

Barcelona lost 2-1 to Valencia in the Copa del Rey final on Saturday, a result that followed the disastrous elimination against Liverpool in the Champions League and added to the team's woeful end to what had been a great season.

Valencia players celebrate their team's second goal during the Copa del Rey soccer match final between Valencia CF and FC Barcelona at the Benito Villamarin stadium in Seville, Spain, Saturday. 25, 2019. (AP PhotoMiguel Morenatti)

Valencia players celebrate their team's second goal during the Copa del Rey soccer match final between Valencia CF and FC Barcelona at the Benito Villamarin stadium in Seville, Spain, Saturday. 25, 2019. (AP PhotoMiguel Morenatti)

"A month ago we were celebrating the league title. Fifteen days ago we were thinking we had a chance at a treble," Valverde said. "And we came up short in the decisive moments in both the Champions League and the Copa del Rey."

The disappointing ending brought out a wave of criticism of Valverde, who last year also finished the season under a cloud after another humiliating Champions League elimination — that time it squandered a big first-leg lead against Roma in the tournament's quarterfinals.

The criticism seems more pronounced this time, with some fans and local media calling for a change at the helm.

It didn't take long after Barcelona's loss to Valencia in Seville for club President Josep Bartomeu to come out and defend the coach.

"Ernesto has a contract and he remains the team's coach," Bartomeu said. "This loss was not the coach's fault. The team created a lot of scoring chances but the ball didn't go in, and what counts is how many times you score."

Bartomeu had already defended Valverde after the demoralizing 4-0 loss to Liverpool in the Champions League, saying the club was not considering a change in command for next season.

Valverde said he was not worried and felt supported by the club despite the disappointing ending.

"It's a bad feeling, we won't deny it, but we have to stay strong," he said. "What we want as coaches is to have a chance to come back. It's tough to lose, it means something went wrong. We have to take the responsibility for it."

Even if Valverde stays as expected, it doesn't mean there won't be changes for Barcelona.

Several players played below expectations this season, especially former Liverpool star Philippe Coutinho, who was regularly jeered by fans and whose place with the club remains uncertain.

Bartomeu will likely have to go shopping in the offseason to try to improve the supporting cast for Lionel Messi, who had a fantastic year but wasn't able to save the season by himself. When Messi looked ordinary, no one was able to take over his role as protagonist, and it proved costly in the decisive moments.

Young midfielder Frenkie de Jong is joining from Ajax and he should significantly boost the midfield, but Barcelona will definitely need to add to its attack, as Luis Suarez was the only true striker who performed consistently well. He couldn't play in the Copa final after undergoing knee surgery and his absence was felt as the team struggled to capitalize on its scoring chances.

Veteran Gerard Pique is set to return for another season in defense, but there are still doubts about the fitness of Samuel Umtiti, who missed several matches this season because of injuries.

"We've been thinking about next season for a while, but it's not the time to discuss the future," Bartomeu said. "We ended with the Spanish league title, it was important. We couldn't win the Copa, but we'll just move on."

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

Tales Azzoni on Twitter: http://twitter.com/tazzoni