  In this paper we construct asymptotically locally AdS and flat black holes in
the presence of a scalar field whose kinetic term is constructed out from a
linear combination of the metric and the Einstein tensor. The field equations
as well as the energy-momentum tensor are second order in the metric and the
field, therefore the theory belongs to the ones defined by Horndeski. We show
that in the presence of a cosmological term in the action, it is possible to
have a real scalar field in the region outside the event horizon. The solutions
are characterized by a single integration constant, the scalar field vanishes
at the horizon and it contributes to the effective cosmological constant at
infinity. We extend these results to the topological case. The solution is
disconnected from the maximally symmetric AdS background, however, within this
family there exits a gravitational soliton which is everywhere regular. This
soliton is therefore used as a background to define a finite Euclidean action
and to obtain the thermodynamics of the black holes. For a certain region in
the space of parameters, the thermodynamic analysis reveals a critical
temperature at which a Hawking-Page phase transition between the black hole and
the soliton occurs. We extend the solution to arbitrary dimensions grater than
four and show that the presence of a cosmological term in the action allows to
consider the case in which the standard kinetic term for the scalar it's not
present. In such scenario, the solution reduces to an asymptotically flat black
hole.
