We propose a model for short duration gamma-ray bursts (sGRBs) based on the formation of a quark star after the merger of two neutron stars. We assume that the sGRB central engine is a proto-magnetar, which has been previously invoked to explain the plateau-like X-ray emission observed following both long and short GRBs. Here, we show that: i) a few milliseconds after the merger it is possible to form a stable and massive star made in part of quarks; ii) during the early cooling phase of the incompletely formed quark star, the flux of baryons ablated from the surface by neutrinos is large and it does not allow the outflow to achieve a bulk Lorentz factor high enough to produce a GRB; iii) after the quark burning front reaches the stellar surface, baryon ablation ceases and the jet becomes too baryon poor to produce a GRB; iv) however, between these two phases a GRB can be produced over the finite timescale required for the baryon pollution to cease; a characteristic timescale of the order of ∼ 0.1 s naturally results from the time the conversion front needs to cover the distance between the rotational pole and the latitude of the last closed magnetic field line; v) we predict a correlation between the luminosity of the sGRB and its duration, consistent with the data; vi) our model also predicts a delay of the order of ten seconds between the time of the merger event and the sGRB, allowing for the possibility of precursor emission and implying that the jet will encounter the dense cocoon formed immediately after the merger. Both long duration (lGRBs) and short duration Gamma Ray Bursts (sGRBs) start with a violent "prompt" emission phase, which generally lasts a few tens of seconds in the case of lGRBs and a few tenths of a second in sGRBs. The prompt emission is in many cases followed by some form of prolonged engine activity, commonly referred to as the "Quasi-Plateau" (QP) in the case of lGRBs and "Extended Emission" (EE) in the case of sGRBs [1]. Beyond similarities in their light curve behavior, sGRBs and lGRBs show remarkably similar spectral properties [2]. This led to the suggestion that a similar central engine is acting in both classes of GRBs, a sGRB being similar to a lGRB cut after 0.The progenitors of lGRBs and sGRBs, on the other hand, are believed to be quite different: the collapse of a massive star for long bursts [4] and the merger of two neutron stars (or of a neutron star and a black hole) for the short bursts [5]. In their original forms, both models postulated a hyper-accreting black hole as the source of the relativistic outflow powering the GRB. However, following the discovery of the prolonged emission, a new model for the engine has grown in popularity, based on the relativistic wind of a newly formed, rapidly rotating proto-magnetar [6,7]. The model was initially proposed to explain the structure of lGRBs, but more recently it has been adapted to interpret also sGRBs [8][9][10] [43].GRB prompt emission results from dissipation within a relativistic jet composed of electron-positron pai...