What legal agreement? Here's an excellent account I just tracked down of the persecution of Galileo by the enemies of science in the Catholic Church. Perhaps you should read that before answering.
Note, btw, the shady methods of Galileo's enemies and how remarkably similar they are to modern creationist tactics....
sounds awfully familiar...