Lionel Messi missed a penalty and Barcelona conceded late as its 29-match unbeaten streak ended in a 1-0 loss to city rival Espanyol in the first leg of their Copa del Rey quarterfinal on Wednesday.
Messi failed from the spot in the 62nd minute, his shot brilliantly saved by goalkeeper Diego Lopez. Youngster Oscar Melendo netted the winner for the hosts in the 88th with his first goal as a professional.
"I have no words, I was looking forward to this first goal," said the 20-year-old Melendo, who had come on as a substitute in the second half.
It was Espanyol's first win against Barcelona at its RCDE Stadium. The second leg of the Catalan derby is next week at Camp Nou.
Barcelona hadn't lost since a 2-0 defeat by Real Madrid in the second leg of the Spanish Super Cup on Aug 16. It had won 23 of its last 29 matches in all competitions.
"We knew we would lose one day," Barcelona midfielder Sergio Busquets said. "The positive thing is that in a week we have a chance to rebound and advance."
Messi had his chance from the spot after Sergi Roberto was fouled by Esteban Granero, but his low shot into the right corner was stopped as Diego Lopez dived to his left to tip the ball away.
It was a rare miss for Messi, who is having a stellar season and is the Spanish league's top scorer with 17 goals.
"The penalty save gave us the boost that we needed," Melendo said. "We were playing too defensively."
Melendo netted the winner with a low shot from the middle of the area after a well-timed pass by Marc Navarro.
Barcelona coach Ernesto Valverde did not use all of the team's regular starters, leaving players such as Luis Suarez on the bench.
The match was interrupted for a few minutes in the 76th after Barcelona goalkeeper Jasper Cillessen was hit by an object thrown by fans behind his goal.
Barcelona midfielder Paulinho was replaced in the second half because of a foot injury.
SEVILLA STRIKE FIRST
Sevilla scored two late goals to come from behind and beat Atletico Madrid 2-1 in the first leg of their quarterfinal.
Diego Costa gave Atletico the lead in the 73rd but the visitors equalized with an own-goal by Atletico goalkeeper Miguel Angel Moya in the 80th and secured the victory with a strike by Joaquin Correa after a breakaway in the 88th.
Valencia also scored two late goals in a 2-1 come-from-behind victory over 10-man Alaves.