We look at the centralizer in a semisimple algebraic group \(G\) of a regular nilpotent element, and show that its closure in the wonderful compactification is isomorphic to the Peterson variety. It follows that the closure in the wonderful compactification of the centralizer \(G^x\) of any regular element \(x\) is isomorphic to the closure of a general \(G^x\)-orbit in the flag variety. We also give a description of the \(G^e\)-orbit structure of the Peterson variety.