Lance Corporal Daniel Smith insisted at his trial that the sex was consensual
The Philippines' Court of Appeal has acquitted a United States marine of rape after the victim appeared to change her testimony.
Lance Corporal Daniel Smith, sentenced to 40 years in jail, was held at the US embassy in Manila pending his appeal. He has now reportedly left the country.
Embassy security was tightened in case of feminist and leftist protests.
They have condemned the ruling, saying it shows Philippine "subservience" to the US, a former colonial power.
The marine's lawyer, Jose Justiniano, said his client "got the justice that he deserved."
Smith, 23, was convicted three years ago of raping the woman, known as Nicole, in a van after a night drinking in a bar near the former US Subic Bay Naval Base in 2005.
He had insisted throughout his trial that the sex had been consensual.
The dramatic year-long trial featured Nicole breaking down in tears, hitting Smith with her fists, and lamenting she was too drunk to stop the unwanted attentions.
The Court of Appeal ruled, however, that "no evidence was introduced to show force, threat and intimidation applied by the accused".
It described the encounter as "the unfolding of a spontaneous, unplanned romantic episode with both parties carried away by their passions and stirred up by the urgency of the moment".
The ruling came after the startling disclosure last month from Nicole, that perhaps she had consented after all.
"My conscience continues to bother me," Nicole wrote from her new home in the US, "realising that I may have in fact been so friendly and intimate with Daniel Smith at the Neptune Club, that he was led to believe that I was amenable to having sex or that we simply just got carried away."
The appeals court said this statement had not influenced its acquittal decision.
"We are outraged," said Renato Reyes of the left-wing group Bayan, about the appeal court's decision.
"This denial of justice can only be blamed on (President Gloria) Arroyo, whose subservience to the US and veneration of the VFA [Visiting Forces Agreement] knows no bounds."
The case has become a lightning rod for vocal groups angry at the abuse of women in the country's large sex industry, and the sense of powerlessness of ordinary Filipinos.
They have been angered that, under the VFA, US soldiers suspected of crimes in the Philippines are allowed to remain in US custody until the completion of any judicial process.
The Philippine Supreme Court had ruled in February that Smith should serve his sentence in a Philippine prison, and asked the government to negotiate his transfer with Washington.
The negotiations were under way when the appeals court announced Smith's acquittal.
The Philippine Senate voted in 1991 to close down two main US bases in the Philippines - Subic and Clark Air Base.
Eight years later, Manila and Washington signed the VFA that allows US forces to conduct war exercises in the Philippines, an American colony from 1898 to 1946.
The US also has a rotating force of about 500 US soldiers in the south of the country, intended to provide counter-terrorism training for Filipino soldiers.