MIDLAND, Texas -- A parade float filled with wounded veterans that was struck by a freight train had crossed onto the railroad tracks after warning signals were going off, investigators said Saturday.

Four veterans of Iraq and Afghanistan were killed and 16 more people were injured when the train crashed into the flatbed truck in West Texas.

It was the second of two floats carrying veterans in Thursday's parade in Midland. The first was exiting the tracks when the warning bells and signals were activated, 20 seconds before the accident, according to the National Transportation Safety Board. The second float didn't enter the tracks until several seconds after the warning system went off, the NTSB said. By that time, the guardrail was lowering.

"Once the crossing becomes active, people should stop," lead investigator Robert Accetta with the NTSB said at a news conference Saturday afternoon.

The timeline was pieced together by combining information from a video camera mounted on the front of the train, another one on a sheriff's car and a data recorder that acts like an airplane's black box, activating when the train blared the horn, NTSB member Mark Rosekind said.

Nine seconds before the crash, the train sounded its horn, a blaring that lasted four seconds, according to Rosekind. The guardrail hit the truck, then the engineer pulled the emergency brake, trying to bring the train that was traveling at 62 mph to a screeching halt.

People on the first float and dozens of others who had come out to greet the veterans shrieked and watched in shock, as some aboard the truck tried to jump off, witnesses said. The veterans' military instincts kicked in as they treated the wounded.

The NTSB has also interviewed the engineer and conductor, and established the train's air brakes were working, Rosekind said. No mechanical problems were found with the cars. A review of the train's maintenance history found no defects, he added. The tracks also had no problems.

Investigators will try to establish on Monday what the engine could have seen as it approached the truck, Rosekind said.

Part of the investigation includes whether the parade group, Show of Support/Hunt for Heroes, had the proper permit. The parade has been an annual event in Midland for nine years.

"It has a long history, and I don't know what the original arrangements were," City Manager Courtney Sharp said. "But for the most part we require permits."

Railroads are a vital part of Midland, a town that sits in the heart of Texas' oil rich Permian basin. It's listed as having nearly 114,000 residents, but residents and officials believe the population has risen significantly with the growth of the oil industry.

Three or four railroad tracks lie within city limits, and the site of the accident is just about 10 minutes from downtown, said Midland spokesman Ryan Stout.

That's considered when the city grants permits for parades and other events, Sharp said.

"We take all steps into consideration when we permit," he said. "I hate to go down that track until all of the investigation is over, but yes we do take that stuff into account."

About 300 people attended a vigil Saturday evening in downtown Midland. They lit white candles and prayed for the victims' families and the community as a whole. The town square was lined with American flags.

Ministers prayed for residents in the town to have strength in wake of the tragedy.

"I promise you the next few days will be tough but when we get to the other side, it will be better," Mayor Wes Perry told the crowd.

"The community is grieving. We are grieving and in pain," Sharp said.

Midland resident Gery Cain said he attended the vigil to "participate in the healing that this will bring to the community."

The veterans were on their way to a banquet in their honor and were being cheered by a flag-waving crowd. It was supposed to be the start of a three-day weekend of banquets, deer hunting and shopping in appreciation of the veterans' sacrifice.

Killed were Marine Chief Warrant Officer 3 Gary Stouffer, 37; Army Sgt. Maj. Lawrence Boivin, 47; Army Sgt. Joshua Michael, 34; and Army Sgt. Maj. William Lubbers, 43.

Two of the injured remained in a Midland hospital Saturday night, one in critical condition and another in stable condition. None of the injuries are life-threatening, said hospital spokeswoman Marcy Madrid.

A third person was moved to another hospital, Midland city officials said late Saturday, but they did not know the hospital name or the person's condition. A fourth person, who was transferred to a Lubbock hospital shortly after the accident, had been in serious condition but it was unclear Saturday night if that remained the case.

Union Pacific spokeswoman Raquel Espinoza said the speed limit in that area was raised from 40 mph to 70 mph in 2006.