SAN FRANCISCO — An investigation published early Monday on the eve of the US election details how Russia built one of the largest and most aggressive "cyberarmies" in the world.

As Russia’s cyberoperations have risen in global prominence (and notoriety), the independent Russian news site Meduza has detailed how Russia built its current cyberabilities. While US officials recently took the unprecedented step of accusing Russia of trying to influence the upcoming vote in the US by hacking and leaking emails in an effort to damage the campaign of Democratic presidential nominee Hillary Clinton, cybersecurity experts claim that Russia has been meddling in the affairs of European states for years. The report reveals a system in which Russia’s top political leadership is tasked with recruiting hackers and blackmailing criminals to do their bidding, all the while testing the limits of their cyberabilities on eastern European states before, ultimately, turning their attention to the US this year. BuzzFeed News was given an early look at the report, authored by journalist Daniil Turovsky, and is publishing some of its findings here. Meduza found that:

- Russia’s Ministry of Defense focused some of its earliest efforts on recruiting both from academic institutions and from hackers who may have arisen from the criminal underground.

- The teams were organized into groups known as “research squadrons,” many of which lay within various Russian ministries and military units.

- Some of Russia’s earliest cyberattacks were on nearby Baltic states, dating back to a dispute with Estonia in 2007 over the placement of a memorial statue.

- Public records show that at least one Russian institution purchased surveillance tools from the private Italian company Hacking Team, which sells products that allow governments to spy on their own citizens.

- Over time, the Russian government developed its own offensive cyberweapons, and also bought tools from cybersecurity companies that could be used for surveillance and espionage.

While the Russian government’s involvement in cyberoperations goes back decades, the Russian military’s involvement started with the appointment of Sergei Shoigu as defense minister on Nov. 6, 2012, according to the research laid out by the independent journalists who work at Meduza, a site based out of Latvia that employs some of Russia’s top reporters, who fled other outlets as they were taken over by Kremlin-friendly voices.

Shortly after taking office, Shoigu started making public statements about the need for a Russian cyberunit that could mirror those of the Cyber Command in the US, Meduza reports. But first, Shoigu needed to recruit. Half a year after taking office, in March 2013, he announced that he was leading a headhunt for young programmers.

"A headhunt in the positive meaning of the word; this need is preconditioned by the scope of software required by the Army in the next five years," Shoigu explained at a meeting with the heads of various engineering colleges and information security departments, Meduza reports.

Cyberwarfare quickly became a central block in Russia's increasingly aggressive foreign policy, with senior Russian politicians at the heart of recruiting and structuring the cyberunits. In 2013, Dmitry Rogozin, then a deputy prime minister, took control of supervising the recruitment for the new cyberunits, saying the move “stems from the necessity to ensure information security of the national infrastructure." In addition to defense, he said the units would also “fight cyberthreats” and undergo linguistic training to make them fluent in English.

Around the start of 2014, the defense ministry created the Center of Special Studies, and began hiring personnel through headhunting sites and the webpages of engineering universities, according to Meduza. They called for expertise in the analysis of exploits (software used for cyberattacks) and reverse-engineering skills (analysis of the mechanisms behind the features of a software product with the aim of replicating them). The employees were granted a high security clearance and a salary of up to 120,000 rubles (about $1,900), according to the Meduza report.

"It would be fairly naive to presume that Russia had not addressed the issue of its presence in cyberspace prior to 2014," Alexander Gostev, a leading anti-malware expert at Kaspersky Lab, a Moscow-based cybersecurity company, told Meduza. "Most likely, they need additional input from outside to perform such work, and this is why the format of a 'research squadron' was chosen."