We use SPH simulations with an approximate radiative cooling prescription to model evolution of a massive and large ($\sim 100$ AU) very young protoplanetary disc. We also model dust growth and gas-grain dynamics with a second fluid approach. It is found that the disc fragments onto a large number of $\sim 10$ Jupiter mass clumps that cool and contract slowly. Some of the clumps evolve onto eccentric orbits delivering them into the inner tens of AU, where they are disrupted by tidal forces from the star. Dust grows and sediments inside the clumps, displaying a very strong segregation, with the largest particles forming dense cores in the centres. The density of the dust cores may exceed that of the gas and is limited only by the numerical constraints, indicating that these cores should collapse into rocky planetary cores. One particular giant planet embryo migrates inward close enough to be disrupted at about 10 AU, leaving a self-bound solid core of about 7.5 $\mearth$ mass on a low eccentricity orbit at a radius of $\sim$ 8 AU. These simulations support the recent suggestions that terrestrial and giant planets may be the remnants of tidally disrupted giant planet embryos.