Representatives of 26 Council of Europe (CoE) member states, plus the US, Canada, Japan and South Africa, put their signatures on the document at an international meeting in Budapest.
The Convention on Cybercrime, sponsored by the CoE, criminalises activities such as online child pornography, fraud and hacking. It also sets rules on how to police the Internet.
A footnote added earlier in November to eliminate racist Web sites and define and criminalise incitement to racial hatred on computer networks was eliminated from the body of the treaty to accommodate the US government's objections.
Civil rights groups and Internet service providers (ISPs) have objected strongly to the treaty, which they say contains vague language, imposes heavy burdens on providers and was drafted in a secretive process that did not allow enough public input.
The CoE, together with the US, Canada and Japan, drafted the treaty, which is open for all countries. The treaty will come into effect when five states, including at least three CoE member states, ratify it.
However, the 15-member European Union is pushing for its own separate law against cybercrime, which is expected to use the Convention as a starting point.
Per Haugaard, information society issues spokesman for the European Commission, said: "We welcome the Convention. It will clarify the legal situation, help dissuade cybercriminals and create awareness of the issue of cybercrime."
The Commission will hold a one-day conference on 27 November on the topic, focusing on the issue of data retention requirements for telecommunications companies and ISPs.
The Commission aims to publish a draft law by the end of the year, Haugaard said.