Amtrak police Sgt. Kevin Dauphin directs passengers to taxis as they get off the last trains from New York and Boston in the early morning hours Monday at Union Station. (Doug Kapustin/For The Washington Post)

The Amtrak passengers rushed out of Union Station at 1:33 a.m. on a chilly, April Monday, the wheels of their luggage clacking against tiles so loudly they startled a young child sleeping in her mother’s lap.

They were racing to form a long line at an unmarked taxi stand. With Metro closed and no other foreseeable way to get home, they found themselves at the mercy of cabdrivers cherry-picking for the best fares.

“Virginia? Anyone going to Virginia?” a cabbie shouted.

“Georgetown? Anyone going to Georgetown?” another inquired.

“No, not Dupont. Foggy Bottom?”

These solicitations were violating civil laws that prohibit cabdrivers from rejecting or choosing riders based on their destinations. That violation is punishable by a ticket and fines up to $250. No matter: There were no officers or inspectors there to enforce the law anyway. And the passengers, desperate and tired, were largely clueless, because there is no display of regulations listing their rights.

When the city’s hack inspectors and cab dispatchers have gone to bed, a special type of bedlam occurs after midnight at Union Station. The unregulated tango between weary passengers and drivers searching for the perfect fare peaks in the darkest hours before the start of the workweek, when locals who squeezed out long weekends in Boston, New York or Philadelphia arrive on trains and buses, eager to end their long, late journey. Union Station managers estimate that as many as 500 arrive between midnight and 4 a.m.

Residents skip others in line to get home faster. There are shouting matches. About 2 a.m. one night, a cabdriver circled the station, warning about potential scams from drivers: “Make sure they use their meters! It’s the law!”

Another predawn Monday, Mark Vershell stood with his wife, son and daughter toward the end of the snaking line of about 60, praying that they could persuade a driver to take them to Takoma Park. A cold rain had started to fall. “This is chaos,” he sighed.

Ron Linton, chairman of the District’s taxi commission, acknowledged that the system isn’t working the way it’s supposed to.

“We know cabdrivers are not following the rules and things are getting wild past midnight,” he said. “The drivers know we don’t have the resources to keep inspectors out so late, so they are rolling the dice and taking a gamble.”

According to the commission’s regulations, not only are cabbies not allowed to deny customers on the basis of destination, but cab sharing is permitted only when a passenger consents and if a dispatcher is present at Union Station to oversee the process.

Those dispatchers stop working at 1:30 a.m., according to Stephano Dubuc, whose company oversees operations at Union Station’s parking garage. But on weekends, out-of-town buses and trains arrive until 3:30 a.m.

In the absence of dispatchers, cabdrivers violate the law and pack in their passengers. Union Station is likely the drivers’ last pickup of the night, and they privately say that the only way they can stay competitive is by doing what their peers are doing. None of them would give their name to a reporter, fearful of losing their license.

For months, the taxi commission chairman and managers from Union Station have been meeting to figure out how to make things smoother.

“We’re going to severely ratchet up our enforcement actions to take care of the complaints coming from Union Station,” Linton said after being told about the incidents by The Washington Post. He just didn’t know when.

The Vershell family had been waiting in line for nearly 15 minutes. It was 1:50 a.m. Five cabs already had at least one passenger, but their drivers continued to search for more.

As cabs, filled with as many as three passengers, waited, one woman trying to get to Columbia Heights got so annoyed that she walked into the street toward them.

“Go!” she yelled at the stalling cabbies.“Go! Other people need to get cabs!”

“This would never happen in New York,” Vershell muttered to his wife, Elizabeth Leff.

The family had spent the weekend at time share in New York. They took their children to see Ellis Island. They watched the movie “Bully.” All in all, it was fun and informative. Now this.

The line had been even worse the week before, stretching to well over 100 people in front of an empty Amtrak Police car. A middle-aged man pivoted from taxi window to taxi window, begging for someone to take him to Forestville.

“I have money — really!” he told them, pulling out a wad of cash.

Minutes later, a college student jumped into a car that already held a passenger headed toward Capitol Hill, at the blessing of the taxi driver. The passenger stepped out as the student got in.

“No one asked me if I wanted to share a cab! I don’t want to share!”

“Are you playing games?” the cabdriver yelled back. “Don’t play games with me!”

The shouting intensified until a police officer finally appeared, telling the driver that he didn’t have the authority to force riders to share cabs. The older man got back in, and the college student got out and returned to the line, sulking.

“I just want to go home.”

Vershell shook his head when he heard the story. His family had waited 25 minutes in line, in the rain, before they finally reached the front.

“We’re going to Takoma Park,” his wife told the driver pulling up in front of them.

“I’m not going there,” the driver responded.

“No, you can’t do that!’ she admonished.

But it was no use. The driver had already sped off. When a cabdriver finally agreed to take her to Maryland, all she wanted to say was, “Thank you.”

If you have an idea for a story about the D.C. area at night, e-mail Robert Samuels at samuelsr@washpost.com.