Abstract: An apparatus and method for desalinating fluids produced or returning from a subterranean formation using pressure from a subterranean formation. Fluid from a formation is sent to a liquid/liquid separator for separating water from the fluid and then to a reverse osmosis unit, one or more of which are configured to operate from pressure delivered from a subterranean formation. The liquid/liquid separator operates under pressure and includes oleophilic materials for extracting oil from the formation fluid.