| We study any four-dimensional Riemannian manifold
 
 with harmonic curvature which admits a smooth nonzero solution
 
 to the
 equation
   where 
 is the
 Ricci tensor of 
,
 
 is a constant and
 
 a function of the
 scalar curvature 
.
 We show that a neighborhood of any point in some open dense subset of
 
 is locally isometric to one of the following five types: (i)
 
 with
 
, (ii)
 
 with
 
,
 where 
 and 
 are the two-dimensional Riemannian manifolds with constant sectional curvatures
 
 and
 
,
 respectively, (iii) the static spaces we describe in Example 3, (iv) conformally flat
 static spaces described by Kobayashi (1982), and (v) a Ricci flat metric.
     We then get a number of corollaries, including the classification of the following
 four-dimensional spaces with harmonic curvature: static spaces, Miao–Tam critical metrics
 and 
-static
 spaces.
     For the proof we use some Codazzi-tensor properties of the Ricci tensor and
 analyze the equation displayed above depending on the various cases of multiplicity
                                                                   
 
                                                                   
 of the Ricci-eigenvalues.
  |