A Roman dominating function (RDF) on a graph G=(V,E) is a function f:V→{0,1,2} satisfying the condition that every vertex u with f(u)=0 is adjacent to at least one vertex v of G for which f(v)=2. The weight of a RDF is the sum f(V)=∑v∈Vf(v), and the minimum weight of a RDF f is the Roman domination number γR(G). A subset S of V is a 2-independent set of G if every vertex of S has at most one neighbor in S. The maximum cardinality of a 2-independent set of G is the 2-independence number β2(G). Both parameters are incomparable in general, however, we show that if T is a tree, then β2(T)≥γR(T). Moreover, all extremal trees attaining equality are characterized.