In this paper we study the Ricci flow on compact four-manifolds with positive isotropic curvature and with no essential incompressible space form. Our purpose is two-fold. One is to give a complete proof of Hamiltons classification theorem on four-manifolds with positive isotropic curvature and with no essential incompressible space form; the other is to extend some recent results of Perelman on the three-dimensional Ricci flow to four-manifolds. During the the proof we have actually provided, up to slight modifications, all necessary details for the part from Section 1 to Section 5 of Perelmans second paper on the Ricci flow.