Let
X
X
be a smooth projective Berkovich space over a complete discrete valuation field
K
K
of residue characteristic zero, and assume that
X
X
is defined over a function field admitting
K
K
as a completion. Let further
μ
\mu
be a positive measure on
X
X
and
L
L
be an ample line bundle such that the mass of
μ
\mu
is equal to the degree of
L
L
. We prove the existence of a continuous semipositive metric whose associated measure is equal to
μ
\mu
in the sense of Zhang and Chambert-Loir. We do this under a technical assumption on the support of
μ
\mu
, which is, for instance, fulfilled if the support is a finite set of divisorial points. Our method draws on analogs of the variational approach developed to solve complex Monge-Ampère equations on compact Kähler manifolds by Berman, Guedj, Zeriahi, and the first named author, and of Kołodziej’s
C
0
C^0
-estimates. It relies in a crucial way on the compactness properties of singular semipositive metrics, as defined and studied in a companion article.