ORLANDO, Fla. -- A man who police say shot an officer before barricading himself in a Florida apartment killed the four children he had been holding hostage before killing himself, police said late Monday. Orlando police Chief John Mina told a news conference just before midnight that the suspect, who was identified as 35-year-old Gary Wayne Lindsey Jr., was found dead in a closet when officers entered the apartment nearly 24 hours after the standoff began.

Mina said officers tried to offer one of their phones to Lindsey, whose phone had spotty service, and saw that one of the children had been killed. Authorities entered the apartment around 9 p.m. hoping to rescue the others, but all were found dead.

The children with Lindsey were 1, 6, 10 and 11, Mina said. CBS Orlando affiliate WKMG-TV reports two of them were Lindsey's children and two were his girlfriend's. She called police Sunday, authorities said.

Gary Lindsey is seen in this May 18, 2018, mugshot after an arrest for a probation violation. Volusia County Corrections

Mina said the children died of apparent gunshot wounds, WKMG added. It wasn't clear when the children were shot.

Get Breaking News Delivered to Your Inbox

The standoff lasted some 23 hours, the station noted.

Officers responding to a domestic violence report were fired upon, police said. Officer Kevin Valencia was shot and was in critical condition but is expected to survive, Mina said Monday. One officer was able to return fire, the police chief said.

Valencia is in his late 20s and has been with the police department since 2016, Mina said.

Court record shows Lindsey, 35, had an extensive criminal history involving arson, battery and theft. He was on probation for several charges, including arson.

Lindsey was a convicted felon, Mina said.

Criminal records showed Lindsey was on supervised probation for an arson conviction in Volusia County, WKMG reports.

Lindsey had been arrested four times for violating his probation in the Volusia arson charge, records show.

Judy Pepper, who lives in the apartment complex, told the Orlando Sentinel she had fallen asleep on the couch after watching a Sunday night baseball game on television when she heard four loud gunshots.

"It just went, 'Pop. Pop. Pop. Pop,'" Pepper said.

She looked out the window and saw three people carrying a police officer onto the grass. She said other officers arrived, cut open his shirt and appeared to be putting bandages on his neck. Then, they put him in a patrol car and sped away.

"Hell, yes, I was absolutely terrified," she said.

Officers evacuated other residents of the complex in the middle of the night. Some were milling around nearby restaurant parking lots Monday morning, still wearing pajamas. They were later taken to a hotel.

The standoff also disrupted the routines of residents who lived in neighboring apartment communities. About five blocks from the apartment, two police squad cars blocked the entrance to the street. Residents of the neighboring apartment complexes had to show identification and be escorted by the police. Several firetrucks lined the road.