BARCELONA, Spain (AP) " Lionel Messi scored a 90th-minute penalty for his second goal of the night to give Barcelona a 2-1 win over lowly Leganes in the Spanish league on Sunday.
Messi's spot-kick, following a questionable penalty after Neymar tumbled in the area, saved Barcelona from a second demoralizing result this week after a 4-0 loss at Paris Saint-Germain in the Champions League on Tuesday.
Coach Luis Enrique, however, acknowledged that the match was far from uplifting for a team that is staring at elimination from European competition and is trailing Real Madrid in La Liga.
"We foresaw that it could be a complicated match given where we were coming from in the Champions League," said Luis Enrique, who has been heavily criticized for the loss at PSG.
"Everything was difficult for us, and that after having scored at the start. It's clear we were lacking confidence for stretches. The game was finally decided by a penalty, but considering how we are right now, we will take it."
Leganes was clinging to a well-deserved point when Neymar stumbled over Martin Mantovani in the area.
The contact was enough to secure a penalty and Messi's league-leading 19th goal of the season.
The match couldn't have started better for the hosts, when Messi tapped in Luis Suarez's cross after just four minutes.
But Leganes, a modest club from Madrid that earned topflight promotion for the first time last season, never lost its poise and threatened whenever it emerged from defending its area.
Barcelona goalkeeper Marc-Andre ter Stegen had to make four saves of goal-bound strikes before Leganes's Unai Lopez got one past him for the equalizer in the 71st.
"We wanted to leave here reinforced either way, with points or thanks to our showing," Leganes coach Asier Garitano said. "We didn't get the points, but I think we leave bolstered by the match. We competed well."
While Barcelona remained one point behind leader Real Madrid" which has two games in hand, few of its fans will take much solace from the drab performance against a side making its first visit to Camp Nou.
Barcelona had romped to a 5-1 victory at Leganes earlier this season, but this time around Leganes was by no means intimidated by Europe's biggest stadium. It remained disciplined in defense despite falling behind early and knew when to take its chances going forward.
Winter signing Nabil El Zhar was particularly dangerous. The attacking midfielder tested Ter Stegen three times before Miguel Guerrero cued the equalizer when he stole the ball from right back Sergi Roberto. Lopez then fired a shot past Ter Stegen after fellow substitute Darwin Machis found him arriving unmarked inside the box.
"The match was a difficult one," Ter Stegen said. "It has been a complicated week. I hope these three points can lift our spirits."
VALENCIA 2, ATHLETIC BILBAO 0
The playmaking of new arrival Fabian Orellana inspired Valencia to a much-needed victory.
The former Celta Vigo midfielder passed for Nani to score before he then combined to help Simone Zaza get his first goal for Valencia since also joining the club last month.
Bilbao was left with 10 men from the 56th minute when substitute Aritz Aduriz was injured three minutes after coming on. Bilbao coach Ernesto Valverde was unable to replace him because he had made all three substitutions.
Valencia's first win in four rounds comes three days before hosting Madrid.
REAL SOCIEDAD 0, VILLARREAL 1
A stoppage-time goal by Samuel Castillejo snatched Villarreal a win at Real Sociedad as the "Yellow Submarine" rebounded from its 4-0 loss to Roma in the Europa League's round-of-32 first leg.
Sociedad and Villarreal remained in fifth and sixth place, respectively.
CELTA VIGO 3, OSASUNA 0
Giuseppe Rossi helped Celta Vigo beat bottom-side Osasuna with a deft touch of his heel to set up Pione Sisto for the opening goal.
Jozabed Sanchez struck in the 87th before passing for fellow substitute Iago Aspas to chip in his 12th goal of the season.
Osasuna's winless streak reached 15 rounds as the Pamplona-based side fell eight points from safety.
This story has been automatically published from the Associated Press wire which uses US spellings