Pilate recognized this when the Jewish religious leaders brought Jesus to him.
Now at the feast the governor was accustomed to releasing to the multitude one prisoner whom they wished. And they had then a notorious prisoner called Barabbas. Therefore, when they had gathered together, Pilate said to them, ‘Whom do you want me to release to you? Barabbas, or Jesus who is called Christ?’ For he knew because of envy they had delivered him
Their envy toward Jesus was due to the fact that He had drawn a large following by claiming to be the Messiah. His miracles verified His claims. Jesus also criticized their corrupt religious system. Because of this they decided to kill Him.