After a varied history as town hall , residence , stable , and church , it was saved from plans devised by Louis XIV 's minister Colbert to move it stone-by-stone to Versailles .
It was built by salves captured during battle .