A German court on Thursday handed an Afghan man a life sentence for a car-ramming attack in Munich last year which killed a two-year-old girl and her mother and left dozens injured.

The court in Munich found the man, named only as Farhad N., guilty of two counts of murder, 23 of attempted murder and 22 counts of bodily harm, 19 of them serious.

The court found that the offences carried a "particular gravity of guilt" -- a designation that makes it much less likely that the 25-year-old will ever be released from prison.

Farhad N. drove a Mini Cooper around a police car and then accelerated into a 1,400-strong trade union march, hurling a 37-year-old woman and her young daughter through the air for 10 metres.

They both sustained severe head injuries from which they died several days later.