Sociedad lacked inspiration and were fortunate not to concede a third goal when a shoot from Angel Lafita went wide.
Madrid: Real Sociedad's hopes of qualifying for the Champions League for the first time in a decade suffered a setback when they surrendered the lead and lost 2-1 at fellow European hopefuls Getafe in La Liga on Monday.
The Basque club's reverse at Getafe's Coliseum stadium in Madrid means they still occupy fourth and Spain's final qualification berth for Europe's elite club competition but their lead over fifth-placed Valencia has been cut to two points after Valencia's 4-0 win at home to Osasuna on Saturday.
San Sebastian-based Sociedad have 58 points with four matches left, Valencia are on 56 and Malaga 53 in sixth. Getafe are eighth on 47 points and still have a chance of securing a place in the Europa League.
Carlos Vela gave Sociedad a fourth-minute lead but the home side turned the match around thanks to goals from Pedro Leon in the 18th minute and Abdelaziz Barrada six minutes before halftime.
Under French coach Philippe Montanier, Sociedad have played some of the most entertaining football of the season and are the only team apart from Real Madrid to have beaten leaders Barcelona.
They lacked inspiration in their latest outing, however, and were fortunate not to concede a third goal in stoppage time when Angel Lafita skewed a shot wide with the goal at his mercy.
"We played really badly but there are always days like this," Sociedad forward Antoine Griezmann said in an interview with Spanish television broadcaster Cuatro.
"We are still two points ahead (of Valencia) and we have a crucial game coming up" (at home to Granada next Monday), the Frenchman added.
Sociedad's golden period came in the 1980s when they twice won La Liga and reached the European Cup semi-finals in 1982-83, where they fell to eventual winners Hamburg SV.
More recently, they spent three successive years in the second division before winning promotion in the 2009-10 season. Fourth place is their best result since they were second in 2002-03.