A maximum principle in relaxed controls