A resist composition comprising a base polymer and a metal salt of carboxylic acid or sulfonamide is provided, the metal being selected from calcium, strontium, barium, cerium, aluminum, indium, gallium, thallium scandium, and yttrium. The resist composition exhibits a sensitizing effect and an acid diffusion suppressing effect and forms a pattern having improved resolution, LWR and CDU.