In May 1926, a coup d'état replaced the republic in Portugal with a military dictatorship, a regime that according to Sousa Mendes "had been greeted with delight" in Portugal. He supported the new regime at first and his career prospects improved. In March 1927, Sousa Mendes was assigned to serve as the Consul in Vigo in Spain, where he helped the military dictatorship neutralize political refugees.