- We study properties of compact stars with the deconfinement phase transition in their interiors. The equation of state of cold baryon-rich matter is constructed by combining a relativistic mean-field model for the hadronic phase and the MIT Bag model for the deconfined phase. In a narrow parameter range two sequences of compact stars (twin stars), which differ by the size of the quark core, have been found. We demonstrate the possibility of a rapid transition between the twin stars with the energy release of about 10 ^52 ergs. This transition should be accompanied by the prompt neutrino burst and the delayed gamma-ray burst.