BERLIN (AP) — The hostage situation at Hamburg Airport ended Sunday afternoon, around 18 hours after a man drove his vehicle through the gates of the airport with his 4-year-old daughter inside, authorities said. The man was arrested and the girl appears to be unharmed.

Hamburg police tweeted that “the hostage situation is over. The suspect has left the car with his daughter. … The child appears to be unharmed.”

Police also said that “the man was arrested by the emergency services without resistance.”

The airport in the northern German city had been closed to passengers and flights canceled since Saturday night when the man, who was armed, broke through an airport gate with his vehicle and fired twice into the air with a weapon, according to German news agency dpa. The man drove the vehicle just outside a terminal building and parked it under a plane.

Authorities said the man’s wife had previously contacted them about a child abduction.

Police said that the 35-year-old man had his 4-year-old daughter inside the car whom he had reportedly taken by force from the mother in a possible custody battle.

A psychologist has been negotiating with the man for 18 hours. Nobody was injured during the standoff since all passengers had evacuated the airport, police said.

The mother of the abducted girl also arrived at the airport on Sunday morning and was getting psychological support, German news agency dpa reported.

A pediatrician also arrived at the airport to look after the girl once the hostage-taking is over, dpa reported.

More than 100 flights were canceled and several planes were rerouted. Thousands of travelers have been affected by the standoff and hundreds were put up at hotels close by.