A compact gate valve for UHV is described. The valve was designed to allow isolation of the ion source volume of an ion gun used in a surface analysis system. Therefore, filaments can be replaced without ultra-high vacuum loss in the analysis chamber. Other applications for this valve are suggested. The valve has been built inside a DN40CF flange. Operation of the valve is done by a linear actuator. Differential pumping is possible with the use of a Tee in the actuator connection. The construction details are described and the testing results are presented.