A microwave watercut sensor for use downhole in so-called smart oil wells, with production from several zones, is described. The main challenges have been the high temperature and pressure, the limited space, and the low power available. The sensor is a semisectorial cavity resonator sensor located in the annulus between the tubing and the casing. The electronics is based on a self-oscillating amplifier with feedback through the sensor. The paper describes the sensor, the electronics, and the results from the tests performed in the laboratory, and in the test rigs of Roxar and Norsk Hydro.