Yves Rausch, 31, was found sitting in a bush after a tip-off from two witnesses, “with four guns visible in front of him”, said Juergen Rieger, the head of the search operation.
The suspect also had an axe in his lap and one further gun, and there was a letter in front of him, Rieger said.
Rausch was slightly injured in the arrest, as was a member of the special forces who was cut with the axe.
“I am relieved, happy and grateful that this exceptional situation for our town has come to an end,” Uwe Gaiser, the mayor of the village of Oppenau, told reporters.
Rausch had fled into the forest on Sunday after he managed to disarm four police officers, sparking a huge search operation.
(article continues below)
See also on The Local:
More than 2,500 officers combed the area with the help of special forces, helicopters, sniffer dogs and thermal imaging cameras for the fugitive, nicknamed “Black Forest Rambo” by the German press after pictures emerged of him dressed in combat gear.
The drama began on Sunday morning when police were informed that a suspicious man was hanging around a hut in the forest near Oppenau.
Four officers sent to the scene said he cooperated at first when approached.
But then he “suddenly and completely unexpectedly” threatened them with a gun and made them put down their own weapons before running away with them.
Police had earlier warned that he may also be carrying a bow and arrow.
Oppenau prosecutor Herwig Schaefer described Rausch on Tuesday as a “weapons freak” with a “great affinity for arms”.
He has a long criminal record, including charges related to the possession of illegal weapons, theft and bodily injury.
He received a juvenile sentence of 3.5 years in 2010 after he shot an acquaintance with a crossbow, seriously injuring her.
Police found child pornography on his mobile phone while investigating him for the possession of explosives in 2019.
Schools, kindergartens and the local swimming pool were closed on Monday as a precaution.
Swastikas and SS symbols
Investigators initially said they did not suspect any far-right or other political motive for Rausch's behaviour.
However, they later revealed he had received an eight-month suspended sentence for incitement to hatred when he was 15 for altering the letters on a sign for a youth organisation so that it read “Juden weg” (“Jews be gone”).
They also said he had made a fake bomb and was known for anti-Semitic statements as well as the use of swastikas and SS symbols.
Rausch had been homeless since autumn last year and had been squatting in the hut where he was spotted on Sunday.
According to a former neighbour who described him as “not an easy person”, he Rausch did odd jobs as a rail worker and a golf course caretaker, the Bild tabloid reported.
Various weapons and petrol canisters were found in his apartment after he was evicted, as well as a small shooting range in the attic, according to Bild.
He then reportedly lived in his car by the local swimming pool for a while before moving into the hut at the edge of the forest.
Rausch will be examined by a psychiatrist due to the “gravity of the crime” and his past history, Schaefer said.
In addition, a blood sample will be taken to check whether he was under the influence of drugs or other substances.