Ecuador's government has ordered everyone in the US Embassy's military group, about 20 Defense Department employees, to leave the country by month's end.
The group was ordered to halt operations in Ecuador in a letter dated April 7, embassy spokesman Jeffrey Weinshenker said Thursday.
The Associated Press was alerted to the expulsions by a senior Ecuadorean official who refused to be identified by name due to the information's sensitive nature.
The expulsion does not affect the embassy's US military attache, said an American official, who insisted on not being quoted by name because he was not authorized to disclose the information. He said Friday that the group's members had not yet left the country.
President Rafael Correa publicly complained in January that Washington had too many military officers in Ecuador, claiming there were 50, and said they had been "infiltrated in all sectors." At the time, he said he planned to order some to leave.
President Correa was in Spain on Friday and made no public comment about the issue. Foreign Minister Ricardo Patino also was in Europe, a ministry official said, saying only Mr. Patino could comment.
Shortly after taking office in 2007, Correa purged Ecuador's military of officers deemed to have close relations with US counterparts. He also ended an agreement with Washington that allowed US drug interdiction flights to be based at the Ecuadorean airfield in Manta.
The US Embassy spokesman said the military group being expelled has 20 Defense Department employees, not all of them uniformed.
Mr. Weinshenker said Washington provided $7 million in security assistance to Ecuador last year, including technical training for maintaining aircraft and cooperation in combating drug trafficking, human trafficking and terrorism. Building relationships with counterparts in partner nations' militaries is a big part of such missions, particularly as US commercial influence ebbs in the region.
Although it has shrunk during Correa's administration, US military cooperation in Ecuador dates back four decades, and Weinschenker said that "all the activities we have carried out have had the explicit approval of our Ecuadorean counterparts."
US relations with the Correa government suffered strains even before Correa provided asylum in 2012 to WikiLeaks founder Julian Assange, whose organization published troves of leaked US military documents and diplomatic cables highly embarrassing to Washington.
Correa accused Washington, a close ally of neighboring Colombia, of meddling in Ecuador's military and police, and he previously expelled at least three US diplomats, including then Ambassador Heather Hodges in 2011. Amb. Hodges was the victim of a cable divulged by WikiLeaks that suggested Correa was aware of high-level police corruption and did not act on it.
In November, Correa's government said it was asking the US Agency for International Development to end operations in the country, accusing it of backing the opposition. USAID is to end operations in September when programs it is funding have run their course. Ecuador's leftist ally Bolivia expelled USAID last year.
Correa is popular at home for his poverty-fighting programs but widely criticized for stifling civil liberties and using criminal defamation law against journalists.
Associated Press writer Frank Bajak in Lima, Peru, contributed to this report.