(CNN) The man who opened fire early Friday at the Trump National Doral Golf Club had been yelling "anti-Trump ... rhetoric" there, Miami-Dade police Director Juan Perez said.

The suspect was identified as Jonathan Oddi, 42, of Doral, Florida. Oddi is in stable condition after police shot him in an exchange of gunfire, Perez said. A Doral police officer suffered broken bones but was not shot, the official said.

The gunman took a flag from a pole in the rear of the complex, brought it into the hotel lobby, draped it over a counter, yelled rhetoric against President Donald Trump and fired a gun into the air -- at the roof and chandeliers, Perez said.

He then "waited for officers to engage him," Perez said.

Perez said the man's immediate motive seemed to be to lure police into a gunfight.

Read More