Karlsruhe police said a hostage situation ended after they entered a pharmacy where people were being held and arrested a suspect.
No one was injured, according to their initial assessment, police said, five hours after the situation began.
Police searched the building where several people had been held hostage, triggering a large-scale operation.
The police were first notified of the situation by emergency calls that arrived at around 4.30pm (3.30pm GMT).
It is unclear how many perpetrators were involved.
A police spokesman earlier said it could not provide information on this or “possible requests and ransom demands for tactical reasons”.