We develop here a procedure to obtain regular static configurations resulting from dynamical gravitational collapse of a massive matter cloud in general relativity. Under certain general physical assumptions for the collapsing cloud, we find the class of dynamical models that lead to an equilibrium configuration. To illustrate this, we provide a class of perfect fluid collapse models that lead to a static constant density object as limit. We suggest that similar models might possibly constitute the basis for the description of formation of compact objects in nature.