The Variscan Orogeny was a phase of mountain building and accretion of terranes that resulted from the closing of the Rheic Ocean when the two paleocontinents Gondwana ( in the south ) and Laurussia ( in the north ) collided .