Toko Ekambi broke the deadlock at the Estadio de la Ceramica in the 59th minute to give Javi Calleja's the vital three points at home.
The triumph moved Villarreal to 14th in the league table with 43 points after 37 games. They are now six points adrift of the drop zone with a game left in the Spanish top-flight.
#VillarrealEibar | 1-0 🚨 FULL-TIME | IT'S ALL OVER AT THE ESTADIO DE LA CÉRAMICA! TOKO EKAMBI'S GOAL SECURES OUR PLACE IN @LaLigaEN NEXT SEASON!!!!! GET IN THERE!!! ENDAVANT #VILLARREAL! 💛💛💛👏👏👏💪💪💪🙌🙌🙌 pic.twitter.com/hIcqSuxkIG— Villarreal CF English (@Eng_Villarreal) May 12, 2019
Toko Ekambi is having an impressive debut campaign in Spain, which has seen him produce 10 goals in 34 league appearances so far.
After avoiding the drop, Villarreal will hope to end their campaign on a high when they visit Getafe on May 18.
The Indomitable Lions have been paired against Ghana, Guinea-Bissau and Benin in Group F.