BERLIN — A rejected asylum seeker from Iran suffered serious injuries when he set fire to himself on Tuesday at a town office in Germany, the authorities said.

The police said the 35-year-old man entered the office in Göppingen, a town near the southwest city of Ulm, at midday and asked two employees for help, showing them papers indicating that his application for German asylum had been rejected.

Staff members said they would help, but the man became aggressive and pulled a bottle out of his backpack, poured liquid over himself and set fire to himself as the two workers fled, the police said.

A third worker grabbed towels from a housekeeping cart and suffocated the flames.

The police said the man was taken by helicopter to a hospital where he was being treated for severe burns.