The bloody knife killings took place mid-morning in the busiest subway station of Hamburg, Germany's second-biggest city.
Knife attacker shot dead outside Iran ambassador's Vienna residence: police
"The crime was very, very terrible in its execution, very targeted and very, very extreme," said police spokesperson Timo Zill.
"We currently assume it was a crime of passion."
The 33-year-old suspect initially ran off but then phoned police, who arrested him inside the Jungfernstieg underground station.
Woman killed, 12 injured in Beijing mall knife attack
Police said the child died immediately in the attack around 0850 GMT and the 34-year-old woman succumbed to her injuries in hospital.
Police and firefighters responded in large numbers, and trauma counselling was offered to witnesses and emergency responders.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ