Article 25 Vienna Convention on Consular Relations
Termination of the functions of a member of a consular post
The functions of a member of a consular post shall come to an end, inter alia:
(a) on notification by the sending State to the receiving State that his functions have come to an end;
(b) on withdrawal of the exequatur;
(c) on notification by the receiving State to the sending State that the receiving State has ceased to consider him as a member of the consular staff.
See also: Article 24 Vienna Convention on Consular Relations