A" fuzzy logic" system was implemented on an oil-pumping station in Colombia to enhance the operation of diesel engines used to power a comlete set of crude-oil pumps. The diesel engines burn a portion of the produced crude oil as fuel. This intelligent system emulates the operator's reasoning to diagnose operating conditions, evaluate conditions leading to an imminent shutdown or a mechanical failure, and decide upon action to keep crude-oil pumps running under optimal and safe conditions.