Flight 631, carrying 83 passengers and crew, had left Costa Rica around 10:30am and was in Panamanian airspace headed for Caracas, Venezuela, when pilots detected the problem and decided to head back.
Back in Costa Rica, the flight crew spent as much fuel as possible before heading for the ground, where airport officials cleared the runway and the fire department spread foam to avoid fire.
All passengers and crew were evacuated safely on the tarmac immediately after the plane touched ground and came to a stop.
Emergency ground crews were able to clean up the fuel and oil that spilled and take the passengers and crew to safety.
The San José airport on Saturday was closed from 12:40pm to 1:30pm.
The airplane was sent to the hangars for inspection, while the passengers were able to board another flight a few hours laters.