An off-duty officer with the Miami-Dade Police Department was in attendance at a family party when he was struck by a stray bullet possibly fired from another property.

A police spokesperson said this is an area where there are several ranches and it’s a place where people sometimes go out shooting.

According to CBS News, the officer—whose name has not been released—was transported to a nearby hospital where he is listed in stable condition.

"This is a miracle," Detective Argemis Colome said. "Very fortunate at the moment and we are very happy. The family is happy. The friends are happy. But this could’ve been a tragedy."

An investigation into the incident remains ongoing.