Firstly, it depends upon the law of the country where the crime was committed as to (1) what exact offence took place and (2) what rights in law a victim has to defend himself against that offence. Whilst this can hugely vary (look at the wildly different legislation in US states) the rule of thumb is (1) the response has to be proportional to the threat - ‘knife to a gun fight’ scenario - and (2) response is only justified to prevent the commission of the crime, not after the event i.e. when the suspect is fleeing. This of course leads to the grey area as to how much if any force can be used to apprehend the suspect.
Having served as a police officer in three countries, I can assure you it’s never cut and dried and so often the victim ends up as the accused…