Let [Formula: see text] be a simple graph with vertex set [Formula: see text] and edge set [Formula: see text]. A Roman dominating function on a graph [Formula: see text] is a function [Formula: see text] satisfying the condition that every vertex [Formula: see text] for which [Formula: see text] is adjacent to at least one vertex [Formula: see text] for which [Formula: see text]. A Roman dominating function [Formula: see text] is called an independent Roman dominating function if the set of all vertices with positive weights is an independent set. The weight of an independent Roman dominating function [Formula: see text] is the value [Formula: see text]. The independent Roman domination number of [Formula: see text], denoted by [Formula: see text], is the minimum weight of an independent Roman dominating function on [Formula: see text]. A subset [Formula: see text] of [Formula: see text] is a 2-independent set of [Formula: see text] if every vertex of [Formula: see text] has at most one neighbor in [Formula: see text]. The maximum cardinality of a 2-independent set of [Formula: see text] is the 2-independence number [Formula: see text]. These two parameters are incomparable in general, however, we show that for any tree [Formula: see text], [Formula: see text] and we characterize all trees attaining the equality.