(CNN) Worries about the Zika virus have led to the relocation of two Major League Baseball games from Puerto Rico to Miami, MLB officials announced Friday.

The two-game series between the Miami Marlins and the Pittsburgh Pirates scheduled for Puerto Rico was moved after a number of players on each team objected to playing in San Juan on May 30 and 31, so Commissioner Rob Manfred agreed to move the series.

"Commissioner Manfred and the MLBPA fully understand the disappointment by those in Puerto Rico to the relocation of the games," the league and players union announced. "MLB and the Players Association did everything possible to adequately address the concerns raised by players and still play the games in Puerto Rico, but despite extensive efforts, they were unable to develop a workable solution."

The Pirates said the health of members of the organization was most important.

"We are saddened by the circumstances in Puerto Rico and elsewhere that led to this decision," team officials said. "We are hopeful that the public health institutions can quickly eradicate the health risks that are regrettably affecting the Puerto Rican people. We look forward to an opportunity in the near future to return to Puerto Rico to play before the great Pirates fans who were so excited for these games."

Read More