PHOENIX — A Mesa police officer who was fired after shooting an unarmed man was rehired by the city so he could get a special pension.

Two years after Philip Brailsford fatally shot Daniel Shaver in a hotel hallway, Brailsford signed an agreement with the city that allowed him to be rehired temporarily, a city spokesman told KTAR News 92.3 FM on Thursday.

The agreement allowed Brailsford to apply for accidental disability pension and medical retirement. He could not perform job duties or collect payment during the period of reemployment, according to the city.

According to the agreement obtained by ABC15, Brailsford had submitted a claim of post-traumatic stress disorder.

The agreement also says the city is on the hook for up to $3 million spent on Brailsford’s defense in lawsuits related to the incident.

The TV station said Brailsford, 28, will receive a monthly check for $2,569.21 each month for the rest of his life unless the board determines he has recovered from PTSD.

The city said Brailsford filed an appeal of his termination after he was fired in 2016, which was suspended until he was acquitted of a murder charge in December 2017.

“The (Public Safety Personnel Retirement System) Local Board determined that Mr. Brailsford met the qualifications for medical retirement citing information provided by multiple independent medical professionals. Mr. Brailsford is now medically retired through PSPRS,” a city spokesman said in an email to KTAR News 92.3 FM.

Follow @KTAR923