(CNN) The Florida Keys and Panama City Beach announced they would restrict access to beaches in an attempt to control the spread of the coronavirus, following a trend set by other local governments in the state.

Starting Sunday at 6 p.m., the Florida Keys will temporarily close to visitors as coronavirus continues to spread throughout the state, according to a news release from the Keys.

Not only will the beach close, so will hotels and other lodging properties. The announcement comes after the island chain found its first confirmed case of coronavirus, which was announced late Thursday.

"We understand that this is a tremendous inconvenience to our visitors as well as to our businesses, and more than an inconvenience to our workers — our families who live here," said Monroe County Mayor Heather Carruthers. "But the health and safety of both our visitors and our residents is paramount."

Panama City Beach will also be closing, starting Friday at 7 p.m., following a unanimous decision from the city council. The closure is expected until March 26, a news release from the city council said.

Read More