A Delta Air Lines flight from Minneapolis-St. Paul to Rapid City, S.D., on Thursday night wound up at a nearby Air Force base instead of the city's airport, the airline and federal regulators said Friday.

Delta flight 2845, an Airbus A320 with 130 passengers, landed at Ellsworth Air Force Base at 8:41 p.m. local time, about nine minutes ahead of its scheduled arrival time at Rapid City Regional Airport.

When the crew members realized what happened, they contacted the airline and other officials for permission to fly to the main airport.

It took about two hours for arrangements to be made, however. The flight took off from the Air Force base at 11:14 p.m. and landed at 11:25 p.m. at the airport, according to Flightradar24, a flight tracking service.

The Air Force base is about 10 miles north of the airport, and their main runways are in virtually the same southeast-to-northwest direction.

The crew was taken off-duty while the National Transportation Safety Board investigates. Delta said it is also investigating.

"Delta has contacted the customers of this flight and offered a gesture of apology for the inconvenience," the airline said in a statement.

The same mistake happened in June 2004, when the crew of a Northwest flight from Minneapolis-St. Paul landed at Ellsworth instead of Rapid City. That flight landed in the early afternoon, and passengers waited in the aircraft for three hours before a new crew arrived to fly the plane to the city airport.

Evan Ramstad • 612-673-4241