In June 1994 a foam pilot test was performed in a production well at the Oseberg Field, North Sea. The Oseberg Field is developed by up-dip gas injection and is currently experiencing gas breakthrough in some of the production wells. The production well, B-27, chosen for the test is located in the Gamma structure and produces from the Oseberg Formation, a highly permeable (2-3Darcy) homogeneous sandstone. B-27 is perforated in 5 intervals in the lower section of the Oseberg Formation. To evaluate the gas-blocking effect of foam within a short time frame, and to increase the accuracy of measurements, only the top perforation interval of B-27 was treated and back-produced. Foam was generated by slug-injection of gas and surfactant dissolved in seawater. Gas-oil ratio (GOR) was reduced by about 50% after foam treatment, compared to pre-foam production tests. The foam pilot-test in production well B-27 was operationally successful. The test has shown that foam can be generated by slug injection of gas and surfactant solution and that foam can reduce GOR even in zones with high oil influx. The foam treatment was effective in reducing gas inflow over the six month period of the test.