We constructed a high-resolution Mg/Ca record on the planktonic foraminifer Globigerinoides sacculifer in order to explore the change in sea surface temperature (SST) due to the shoaling of the Isthmus of Panama as well as the impact of secondary factors like diagenesis and large salinity fluctuations. The study covers the latest Miocene and the early Pliocene (5.63.9 Ma) and was combined with δ18O to isolate changes in sea surface salinity (SSS). Before 4.5 Ma, SSTMg/Ca and SSS show moderate fluctuations, indicating a free exchange of surface ocean water masses between the Pacific and the Atlantic. The increase in δ18O after 4.5 Ma represents increasing salinities in the Caribbean due to the progressive closure of the Panamanian Gateway. The increase in Mg/Ca toward values of maximum 7 mmol/mol suggests that secondary influences have played a significant role. Evidence of crystalline overgrowths on the foraminiferal tests in correlation with aragonite, Sr/Ca, and productivity cyclicities indicates a diagenetic overprint on the foraminiferal tests. Laser ablation inductively coupled plasmamass spectrometry analyses, however, do not show significantly increased Mg/Ca ratios in the crystalline overgrowths, and neither do calculations based on pore water data conclusively result in significantly elevated Mg/Ca ratios in the crystalline overgrowths. Alternatively, the elevated Mg/Ca ratios might have been caused by salinity as the δ18O record of Site 1000 has been interpreted to represent large fluctuations in SSS, and cultivating experiments have shown an increase in Mg/Ca with increasing salinity. We conclude that the Mg/Ca record <4.5 Ma can only reliably be considered for paleoceanographical purposes when the minimum values, not showing any evidence of secondary influences, are used, resulting in a warming of central Caribbean surface water masses after 4.5 Ma of ca. 2°C.