Countries "of the world" or "in the world"

How should I say:

There are many threats faced by almost all countries IN the world

or

There are many threats faced by almost all countries OF the world

I used to say "IN the world". However, I have seen both of the cases on the Internet.


Solution 1:

In general, of is the more used collocation in the construction all countries of/in the world. Have a look at this ngram. This might be based in the fact that of the world regardless of what it follows is already more idiomatic as in the world. (Ngram)

It seems however, that the usage of in gains favor if whatever is referred is more tangible. In this ngram country and nation in singular usage, places an people are used with in while more abstract concepts like part(s), rest, end, knowledge, history and creation are using of.

Solution 2:

When the sentence starts with "There is/are", my preference is "in the world". Otherwise, "of the world" will be my choice.