TWO police officers have been shot and killed in a restaurant in Florida in what officials believe was an “ambush attack.”

The sheriff’s deputies were shot dead after a man fired a gun through the window of the Ace China restaurant in the small town of Trenton, where the victims were eating together around 3pm local time (5am AEST).

The gunman was subsequently found dead outside the restaurant. It is understood he took his own life.

Gilchrist County Sherifff Robert D. Schultz identified the slain officers as Sgt. Noel Ramirez, 30, a seven-year law enforcement veteran, and Deputy Taylor Lindsey, 25, a three-year law enforcement veteran.

Schultz said Ramirez had children and was married, while Lindsey was not married but had a girlfriend.

The two were “the best of the best,” Schultz said. “They’re men of integrity. They’re men of loyalty. They’re God-fearing. And they loved what they did. And we’re very proud of them.”

Trenton is a small community, about two hours southwest of Jacksonville.

At this point, there is no clear motive for the shooting, the Alachua County Sheriff’s Office said, adding that it was an active criminal investigation.

Florida Attorney-General Pam Bondi issued a statement saying: “My heart breaks with the tragic news of two Gilchrist County deputies that were senselessly killed today while in the line of duty. The daily risk that law enforcement officers take to protect our communities is overwhelming.”

“My deepest condolences and prayers are with their families as they mourn the devastating loss of their loved ones. May their families, friends and fellow officers find peace and comfort during this very difficult time.”

US President Donald Trump offered his condolences via Twitter, writing: “the families, friends and colleagues of the two @GCSOFlorida deputies (HEROES) who lost their lives in the line of duty today.”

Trump was in Florida yesterday, touring the Joint Interagency Task Force South in Key West, which battles drug trafficking.

The president used his visit to also push his border wall.

DO YOU, OR SOMEONE YOU KNOW, NEED HELP?
Lifeline on 13 11 14 or the Suicide Call Back Service 1300 659 467 for 24-hour Australian counselling services.

Beyondblue (1300 22 4636) for 24-hour phone support, online chat, resources and apps.