China called the ruling "ill-founded" and says it will not be bound by it.
China claims almost all of the South China Sea, including reefs and islands also claimed by others.
The tribunal in The Hague said China had violated the Philippines` sovereign rights. It also said China had caused "severe harm to the coral reef environment" by building artificial islands.
The ruling came from an arbitration tribunal under the United Nations Convention on the Law of the Sea (UNCLOS), which both countries have signed.
The ruling is binding but the tribunal, the Permanent Court of Arbitration, has no powers of enforcement.
The US sent an aircraft carrier and fighter jets to the region ahead of the ruling, prompting an angry editorial in the Global Times, a strongly nationalist state-run newspaper, calling for the US to prepare for "military confrontation".
Meanwhile, the Chinese Navy has been carrying out exercises near the disputed Paracel islands.
Philippe Sands, a lawyer for the Philippines in the case, said it was a "clear and unanimous judgement that upholds the rule of law and the rights claimed by the Philippines".
He called it a "definitive ruling on which all states can place reliance".
However, the Chinese state news agency Xinhua said that "as the panel has no jurisdiction, its decision is naturally null and void".
The tribunal was ruling on seven of 15 points brought by the Philippines. Among the key findings were:
-Fishermen from the Philippines and China both had fishing rights around the disputed Scarborough Shoal area, and China had interfered by restricting access.
-China had "destroyed evidence of the natural condition of features in the South China Sea" that formed part of the dispute.
-Transient use of features above water did not constitute inhabitation - one of the key conditions for claiming land rights of 200 nautical miles, rather than the 12 miles granted for reefs.
Rocks, reefs or islands - what is the difference?
-Low-tide elevations, or reefs, which are visible only at low tide, get no territorial waters,
Rocks, which are defined as anything above water at high tide regardless of size, get a 12-nautical mile limit of water around them.
-An island, which is able to "sustain human habitation or an economic life of its own", is given a 200-nautical mile exclusive economic zone around it.
More about: