Police were on Thursday called to the German capital’s Spandau District, where the assailant, identified as Rafik Mohamad Yousef, had started to threaten the public with the object.
When the victim approached him, he stabbed her, prompting her colleagues to open fire.
"He had been convicted of being a member of a terrorist association and of being involved in a plot to murder the [former] Iraqi prime minister," Berlin police said in a message posted on Twitter.
Frank Henkel, the interior minister for the state of Berlin, said the reasons for the attack were still unclear. "There are indications that this wasn't a planned act," he, however, noted.
The 41-year-old had been arrested in 2004 after being suspected alongside two others of being part of a plot to attack Iraq's former Prime Minister Ayad Allawi during a visit to the German capital.
He was convicted seven years ago of belonging to an al-Qaeda-linked terror group.