Ciprian Marica scored twice as Getafe beat Rayo Vallecano 2-1 to secure their place in the Primera Division.Ciprian Marica scored twice as Getafe beat neighbours Rayo Vallecano 2-1 to secure their place in the Primera Division for another year. The Romanian opened the scoring at Vallecas in the first half and then converted a stoppage-time penalty to snatch a win after Roberto Trashorras had equalized for the hosts. Getafe's 10th season in La Liga was one of their toughest and they spent the final five months fighting a relegation battle, at one point going four months without a win. But the decision to sack Luis Garcia in March and appoint former player Cosmin Contra has paid off, the Romanian coach picking up 11 points in the last five games to steer his team clear of the relegation zone at the right time. The Madrid side only needed to draw their final game to avoid the drop, but went looking for the opening goal from the off. Angel Lafita tested Rayo stopper Ruben Martinez early on and then Lisandro Lopez sent a free header off target. Getafe sustained their momentum for most of the first half and took a deserved lead in the 42nd minute. Ciprian used pace and strength to beat two defenders in the middle of the pitch, then from 25 yards he drove the ball into the bottom corner. Getafe missed a number of chances to double their lead in the second half but found themselves level as a result of some poor goalkeeping by Julio Cesar. Rayo captain Trashorras sent a free-kick into the area in the hope a team-mate would get a touch on it, but the ball missed everyone and sailed straight into the opposite corner, and past the hapless Brazilian goalkeeper. Rayo then missed a series of chances to get a winner and land Getafe in trouble. Joaquin Larrivey headed over the bar, Cesar saved an attempted lob by Seba Fernandez and then produced an outstanding save to deny the Uruguayan again. At the other end Ciprian had a goal ruled out for offside and Pablo Sarabia blazed over the bar, while Alberto Bueno also had a goal disallowed, narrowly caught offside. Cesar made one final save at the start of stoppage time to deny Leonel Galeano in the goalmouth, but then Getafe broke and won a penalty. Substitute Jorge Sammir raced into the box and was caught by Ruben, who was spared a red card by the referee. Ciprian sent Ruben the wrong way from the spot to claim the side's second straight victory and now Getafe can look forward to spending an 11th season in Spain's top flight.