The erstwhile pirate thus became a policeman during the last years of his life.
After he retired from being a pirate, he became a policeman.