Trains could not enter or exit Union Station for more than 20 minutes Thursday morning because of an Amtrak signal system error, causing delays throughout the morning commute.

The communications error happened about 8:45 a.m., preventing all Amtrak and Metra trains from entering or exiting the station, according to Amtrak spokesman Marc Magliari.

The system was partially back online by 9:07 a.m. and was back to normal by about 9:30 a.m., Magliari said. Amtrak estimated that about two dozen trains were affected by the disruption, with delays ranging from five to 65 minutes.

Delays on Metra’s BNSF Railway, North Central Service and Milwaukee District North and West lines ranged from 10 to 26 minutes, according to service alerts from¬†Metra.

Riders were advised to listen to platform announcements for the most up-to-date delay information, according to Metra.

BNSF trains were already running behind schedule Thursday morning because of a separate mechanical problem.