ROME — Less than a month before Eike Schmidt was meant to leave his post as the director of the Uffizi Gallery in Florence to lead the Kunsthistorisches Museum in Vienna, the German art historian announced on Wednesday that he had changed his mind.

“Florence is too close to my heart,” he told reporters at an impromptu news conference at the Uffizi, hastily called after Austrian news media leaked the decision and cited an angry reaction from Alexander Schallenberg, the Austrian culture minister.

“This last-minute cancellation is highly unprofessional and actually unprecedented,” Mr. Schallenberg, who is also the foreign minister, told Die Presse, the Austrian newspaper that first reported the story.

Mr. Schmidt, who was named director of the Uffizi in 2015 on a four-year contract, said he wanted to stay at the Florence museum to continue the ambitious program of change he had begun there. But his reappointment is not a done deal: Mr. Schmidt will need the endorsement of the Italian culture minister, Dario Franceschini.