Ambassador

An ambassador was the official envoy of one government or political entity to another, or to an organization of political entities. Ambassadors also functioned as the heads of embassies. Customarily in the United Federation of Planets, ambassadors represented the Federation to non-member worlds, and sometimes member worlds had ambassadors to represent their worlds to the Federation itself. They had the power to file a diplomatic protest.
As high-ranking official representatives, Federation ambassadors have powers to issue orders and special instructions to Starfleet starship commanders.
When protocol does not call for a representative of full ambassador rank, a liaison officer drawn from a government's military or civil service corps may instead serve the same duties.