We solve explicitly the following problem: for a given probability measure μ, we specify a generalised martingale diffusion (Xt) which, stopped at an independent exponential time T, is distributed according to μ. The process (Xt) is specified via its speed measure m. We present two heuristic arguments and three proofs. First we show how the result can be derived from the solution of [Bertoin and Le Jan, Ann. Probab. 20 (1992) 538–548.] to the Skorokhod embedding problem. Secondly, we give a proof exploiting applications of Krein's spectral theory of strings to the study of linear diffusions. Finally, we present a novel direct probabilistic proof based on a coupling argument.