BOSTON (AP) — Four Boston police officers have been cleared of any wrongdoing in the fatal shooting of a man who opened fire on them last year.

A report released by Suffolk County District Attorney Daniel Conley on Friday says the officers were justified when they shot 29-year-old Peter Fanfan in the city's Dorchester neighborhood in February 2016.

The investigation found that Fanfan was fleeing the scene of a violent home invasion he had just committed with another man when the officers arrived and confronted him.

Conley says Fanfan opened fire on the officers before they returned fire, striking him five times. He died at the scene. None of the officers were injured.

The report says the use of deadly force was "a reasonable and lawful exercise of self-defense and defense of others."