Sergei Butorin, 36, and Marat Polianksy, 28, were arrested late Wednesday at a brothel in this northeastern Spanish town, a police statement said.
An international arrest warrant named them as the suspected heads of the criminal gang Orekhovskaya, according to the statement.
Butorin and Poliansky resisted arrest, pulling pistols, but officers overwhelmed them.
Spanish police said they had worked closely on the arrest with Russian officers who were sent to Barcelona.
Police also seized two pistols, two machine guns, ammunition, two luxury cars and fake documents in an apartment in Castelldefels where the two suspects were hiding.
Both Butorin and Poliansky are wanted in Russia on charges relating to 29 killings, including the slaying of six police officers and a prosecutor who was investigating the group. Other charges are extortion, robbery and belonging to an illegal group.
Russian authorities have already requested their extradition.
A Message from The Moscow Times:
Dear readers,
We are facing unprecedented challenges. Russia's Prosecutor General's Office has designated The Moscow Times as an "undesirable" organization, criminalizing our work and putting our staff at risk of prosecution. This follows our earlier unjust labeling as a "foreign agent."
These actions are direct attempts to silence independent journalism in Russia. The authorities claim our work "discredits the decisions of the Russian leadership." We see things differently: we strive to provide accurate, unbiased reporting on Russia.
We, the journalists of The Moscow Times, refuse to be silenced. But to continue our work, we need your help.
Your support, no matter how small, makes a world of difference. If you can, please support us monthly starting from just $2. It's quick to set up, and every contribution makes a significant impact.
By supporting The Moscow Times, you're defending open, independent journalism in the face of repression. Thank you for standing with us.

Remind me later.