The Philippine Supreme Court decided on Tuesday that a military agreement that was signed in 2014 with the United States is constitutional.
With the approval of the deal, US forces will show a greater presence in the former American colony as tensions simmer in the South China Sea.
The Enhanced Defence Cooperation Agreement (EDCA) was signed for 10 years from 2014, but not implemented as some lawmakers and activists called it unconstitutional because it surrendered Philippine sovereignty to a foreign power.
Yet the Supreme Court denied the petition with a 10-4 vote.
The spokesman Theodore Te said that the President Benigno Aquino's government had the authority to sign the pact and did not need congressional approval.
"EDCA is not constitutionally infirm. It remains consistent with existing laws and treaties that it purports to implement," Te said.
The deal allows US troops to build facilities to store equipment for maritime security and humanitarian and disaster response operations, in addition to broad access to Philippine military bases.
Dozens of anti-US activists held protests outside the court against the deal which they say would make the Philippines "a launching pad for military intervention in the region."
"As Manila finds itself the target of Chinese coercion in the West Philippine Sea [South China Sea] and is looking to Washington for leadership, this agreement will give us new tools to ... expand engagement with the Philippine Armed Forces, and enhance our presence in Southeast Asia," US Senate Armed Services Committee Chairman John McCain said.
China claims almost all of the South China Sea, besides the conflicting claims from the Philippines, Vietnam, Malaysia, Taiwan and Brunei.
The court ruling came hours before the Philippine defence and foreign ministers were to hold talks with US counterparts in Washington over South China Sea and the Trans-Pacific Partnership trade deal.
The two allies are already bound by a mutual defence treaty signed in 1951 and a visiting forces agreement signed in 1998.