The men worked quickly from their small boat, blocking off a section of Mississippi River shoreline with giant yellow floating barriers. The goal? To keep thousands of gallons of imaginary vegetable oil pouring from a derailed train from reaching an environmentally sensitive area.

It was one of three scenarios played out at various points of the river near the Twin Cities on Thursday as part of a training exercise to prepare for an actual large-scale pollution or security crisis on the river.

In all, 34 government agencies and private companies took part in what the U.S. Coast Guard calls its Area Maritime Security Training and Exercise Program.

Participants had the rare chance to practice the sort of collaboration required during a crisis.

"As much as we do often work together, it's not to this scale," said Petty Officer Alexandria Preston, a Coast Guard spokeswoman. "We're kind of building that cohesiveness with the other agencies so we can accomplish our common goals."

Each government agency involved, including various departments in St. Paul, the Minneapolis Fire Department, the FBI and the Environmental Protection Agency (EPA), has different equipment, laws to obey and ways of doing things, Preston said, so such rehearsals are key.

The agencies planned to assess how well the various emergency plans worked so they could be fine tuned.

Besides the oil spill, other scenarios included a riverboat hijacking in St. Paul and an underwater improvised explosive device attached to a passenger vessel in Minneapolis. A dive team located and dismantled it.

"Each one has its own individual challenges," Preston said.

Part of the exercise was rehearsing how to share information during the crises. At St. Paul's Wellstone Center, about 30 people scurried around a makeshift "joint information center," coordinating communication about the three staged incidents. Many played parts similar to their real-life jobs in public affairs while others assumed fictional roles, such as members of the media.

They worked together to field phone calls, write news releases and scour Twitter, trying to sort out legitimate information from "fake news."

"This is great training for [the spokespeople]," said Steve Davis, chief operating officer of All Hands Consulting, who was working for St. Paul Emergency Management. "You'd rather train on this today than during a real life incident."

On the river

The oil spill — which of course involved no actual oil — occurred when a train car derailed on an Inver Grove Heights railroad bridge. Hours after the 100,000 gallon spill occurred, several dozen people, including representatives from the EPA, the Minnesota Pollution Control Agency and five different railroads, gathered in nearby St. Paul Park to simulate the clean up procedure.

Railroads do ongoing training on how to address these situations, said Amy McBeth, a BNSF Railway spokeswoman, but this exercise was notable because of its large scale.

Crews set up booms — long, buoyant barriers with additional material hanging below — both to contain the spill and to divert it.

"This is an activity … [that] if you don't practice, you're not very good at," said Patrick Brady, BNSF Railway's general director of hazardous materials. "You can't just place boom anywhere."

Railroads usually compete with each other, Brady said, but activities like this bring everyone together.

A handful of people headed out in an olive-green johnboat Thursday to watch crews set up the booms. In an actual emergency, officials would be watching for navigational hazards or snagged ropes, said Ben Foster, a fire protection specialist with Minneapolis Fire Inspection Services.

At day's end, Capt. Scott Stoermer, commander of Coast Guard Sector Upper Mississippi River, said the exercises were a success: "It bodes well for emergency response in St. Paul."

Erin Adler • 612-673-1781