SAN FRANCISCO — In 2014, Russians working for a shadowy firm called the Internet Research Agency started gathering American followers in online groups focused on issues like religion and immigration. Around mid-2015, the Russians began buying digital ads to spread their messages. A year later, they tapped their followers to help organize political rallies across the United States.

Their digital instrument of choice for all of these actions? Facebook and its photo-sharing site Instagram.

The social network, more than any other technology tool, was singled out on Friday by the Justice Department when prosecutors charged 13 Russians and three companies for executing a scheme to subvert the 2016 election and support Donald J. Trump’s presidential campaign. In a 37-page indictment, officials detailed how the Russians repeatedly turned to Facebook and Instagram, often using stolen identities to pose as Americans, to sow discord among the electorate by creating Facebook groups, distributing divisive ads and posting inflammatory images.

While the indictment does not accuse Facebook of any wrongdoing, it provided the first comprehensive account from the authorities of how critical the company’s platforms had been to the Russian campaign to disrupt the 2016 election. Facebook and Instagram were mentioned 41 times, while other technology that the Russians used was featured far less. Twitter was referred to nine times, YouTube once and the electronic payments company PayPal 11 times.