WASHINGTON — The Trump administration has ordered the State Department to stop issuing visas to unmarried same-sex partners of foreign officials working in the U.S., officials said Tuesday.

U.S. officials said the new rule was introduced in July to match the State Department’s policy for its own staff serving abroad. “It is a recognition and a codification of the fact that same-sex marriage is legal in the United States,” one of the administration officials said.