A resist composition comprises a metal compound obtained from reaction of a starting metal compound having formula (A-1) or a (partial) hydrolyzate or condensate or (partial) hydrolytic condensate thereof, with a di- or trihydric alcohol having formula (A-2).M(OR1A)4 (A-1)R2A(OH)m (A-2)In formula (A-1), M is Ti, Zr or Hf, and R1A is alkyl. In formula (A-2), m is 2 or 3, R2A is a divalent group when m=2 or a trivalent group when m=3. The resist composition exhibits improved resolution and edge roughness when processed by the EB or EUV lithography.