We report the dramatic effect of applied pressure and magnetic field on the layered intermetallic compound Pr0.5Y0.5Mn 2Ge2. In the absence of pressure or magnetic field this compound displays interplanar ferromagnetism at room temperature and undergoes an isostructural first order magnetic transition (FOMT) to an antiferromagnetic state below 158 K, followed by another FOMT at 50 K due to the reemergence of ferromagnetism as praseodymium orders (TCPr). The application of a magnetic field drives these two transitions towards each other, whereas the application of pressure drives them apart. Pressure also produces a giant magnetocaloric effect such that a threefold increase of the entropy change associated with the lower FOMT (at TCPr) is seen under a pressure of 7.5 kbar. First principles calculations, using density functional theory, show that this remarkable magnetic behavior derives from the strong magnetoelastic coupling of the manganese layers in this compound. 2013 American Physical Society.