Betis started a point above the drop zone knowing a win would keep them in the top tier but Sporting's 2-1 comeback win over Recreativo Huelva coupled with Osasuna's sensational 2-1 victory against nine-man Real Madrid saw them relegated with 42 points.
Betis, who are based in the southern city of Seville, were last relegated in 2000 but immediately won promotion the following season and have been in the first division since 2001, finishing as high as fourth in 2005.
"It is a sad day because once again the football gods weren't on our side," said Betis coach Jose Maria Nogues. "Betis now have to get back in the top division for its fans and history."
Getafe, who drew 1-1 with Racing Santander, also finished on 42 points but stayed up on goal difference while Valladolid's draw at Betis was enough to keep them safe.
At half-time Sporting Gijon, trailing Recre 1-0, were set to be relegated but came back to win 2-1 and secure their top-flight status.
Sporting had spent a decade in the second division before winning promotion last season and defied the odds to stay up with Luis Moran scoring a dramatic winner.
"It was an agonising game that felt like seven days," said Sporting coach Manolo Preciado. "Our fans are special and their contribution throughout this season has been pivotal."
Osasuna were third from bottom before kick off and fell behind against Real Madrid when Gonzalo Higuain scored early on.
"We reached our target although it was a bit last minute," said Camacho. "It is clear that Osasuna need to reconstruct the squad a bit because for the past two seasons we have been fighting for survival on the final weekends of the season."
Tamudo, the club's all-time top-scorer and an icon after spending his entire career at Espanyol, scored twice in the first half and completed his treble with a 56th-minute penalty to give the Montjuic the perfect send-off.
Espanyol's new Cornella-El Prat stadium looked destined to host second-division football next season before the club produced a sensational late run to beat the drop.
With 26 games played Espanyol were bottom of the table, seven points from safety, but Argentine coach Mauricio Pochettino turned things around and a burst of form saw the club win eight out of their ten final games.
Malaga coach Antonio Tapia confirmed that he would not be in charge of the club next season, saying that the time was right to step down.
"I won't be coach next season," said Tapia. "After an excellent season I think it is the ideal time for my family and I to end this chapter in my life."
Elsewhere, Sevilla defeated relegated Numancia 2-0 in a game with little at stake.
Sevilla already had a Champions League spot wrapped up before the game and coach Manolo Jimenez tested fringe players with next season in mind.
Jimenez was recently rewarded with a contract extension until 2010 after getting Sevilla into the Champions League by finishing third and now has the task of trying to close the gap on the top two of Barcelona and Real Madrid.
Numancia will prepare for life in the second division with the highlight of their campaign a 1-0 victory over treble-winners Barcelona in Soria on the opening day of the season.
Source: AFP Global Edition