A consul is an official representative of a government who resides in a foreign country to assist and protect citizens of the consul's country, and to promote and facilitate commercial and diplomatic relations between the two countries. A consul is generally part of a government's diplomatic corps or foreign service, and thus enjoys certain privileges and protections in the host state, albeit without full diplomatic immunity. Unlike an ambassador, who serves as the singular representative of one government to another, a state may appoint several consuls in a foreign nation, typically in major cities; consuls are usually tasked with providing assistance in bureaucratic issues to both citizens of their own country traveling or living abroad and to the citizens of the country in which the consul resides who wish to travel to or trade with the consul's country. In classical Greece, some of the functions of the modern consul were fulfilled by a proxenos. Unlike the modern position, this was a citizen of the host polity (in Greece, a city-state). The proxenos was usually a wealthy merchant who had socioeconomic ties with another city and who helped its citizens when they were in trouble in his own city. The position of proxenos was often hereditary in a particular family. Modern honorary consuls fulfill a function that is to a degree similar to that of the ancient Greek institution. Consuls were the highest magistrates of the Roman Republic and Roman Empire. The term was revived by the Republic of Genoa, which, unlike Rome, bestowed it on various state officials, not necessarily restricted to the highest. Among these were Genoese officials stationed in various Mediterranean ports, whose role included duties similar to those of the modern consul (i.e., helping Genoese merchants and sailors in difficulties with the local authorities). The consolat de mar was an institution established under the reign of Peter IV of Aragon in the fourteenth century, and spread to 47 locations throughout the Mediterranean.