Several hours after the shooting, the suspect was found dead, The Associated Press reported. Police said he had been shot but it was not immediately clear whether he had killed himself or been hit by an officer's bulelt during the shootout.
Police negotiators tried to get the gunman to surrender, but he did not respond. Heavy equipment was then brought in to tear down a wall of the home. During that process, the man's body was found inside, the AP reported.
See more coverage from Patch.com.
The slain officers have been identified as Tom Baitinger, 48, and Jeffrey Yaslowitz, 39. According to WTSP-10 News, Baitinger joined the Police Department in 1996. He leaves behind a wife. Yaslowitz was hired in 1999 and was married with three children.
The marshal, who has not been identified, was shot twice but is expected to survive, officials said.
The warrant police were trying to serve was for a convicted sex offender named Hydra Lacy Jr., who was wanted on aggravated battery charges. Authorities later confirmed that Lacy was the gunman who opened fire.
According to the St. Petersburg Times, Lacy was the brother of former world champion boxer Jeff Lacy.
"Our community has suffered a loss today," St. Petersburg Police Chief Chuck Harmon said during a news conference late this morning outside Bayfront Medical Center.
The shooting marks the second time in recent days that police officers in Florida have been shot while serving warrants.
On Thursday, two veteran Miami-Dade police officers were shot and killed as they tried to serve a warrant on a man wanted for murder, The Miami Herald reported.
In Detroit, four officers were wounded Sunday during a shootout inside a precinct station house. The gunman was killed during the shootout. According to ABC News, the man was a relative of a suspect in a double homicide.
In a shooting that occurred Sunday in Port Orchard, Wash., two officers were wounded when a man opened fire in a Walmart parking lot. The suspect was killed during the shootout.
And in Indianapolis, a police officer was shot four times, including twice in the face, during a traffic stop on Sunday morning. According to WTHR, the officer is in critical condition, and the suspect is in custody.