The far-right group Hogar Social Madrid (Madrid Social Home) posted photos on social media on Monday, showing members lighting flares on a highway overpass facing a major mosque in the city, often referred to as the M-30 mosque after the motorway.
"The first images of actions taken a moment ago against Islamic terrorism at the M-30 mosque in Madrid, which finances the Islamic State: MOSQUES OUT OF EUROPE," states the post.
The group also hung a sign, reading "Today Brussels, tomorrow Madrid?" and started using a hashtag on Twitter of #TerroristasWelcome, referencing the tag #RefugeesWelcome.
In 2014, Spanish officials found that a network of extremists had used the cafeteria of the mosque to recruit jihadists for Isis, before the network was dismantled.
The far-right group's actions followed terrorist attacks claimed by Isis in Brussels on Tuesday, which left at least 30 people dead and scores more injured at the airport and metro stations in the Belgian capital.
"Without a doubt, what happened in Brussels on March 22nd is unacceptable, nor is it accepted within our logic or religion to commit such nefarious attacks," the Madrid mosque and Centre for Islamic Culture wrote in a statement to The Local on Wednesday.
"Muslims all around the world have condemned this terrible event that took the lives of innocent victims, including Muslims as well," the statement said, adding that the Madrid mosque also "emphatically" condemned the attacks.
The statement, sent by Imam Hussam Khoja, also addressed the reaction of the far-right group in Madrid.
"We also condemn the reactions of extremists following what happened, including what took place yesterday afternoon by an extremist group that tried to attack our great mosque and cause damage to it," the mosque said.
"We ask for the public to condemn this event and every other extremist act, reaction or prejudice against a religion.
Story continues below…
"Finally, we repeat and reiterate as we always have that the Islamic religion, based on our Holy Book, the Koran, and the tradition of the Prophet Muhammad, peace be with him, does not have any relation with these kind of acts."
The left-wing party of Madrid mayor Manuela Carmena, Ahora Madrid, took to social media to denounce the actions taken against the mosque.
"Do not go and criminalize the Muslim community," the official party account wrote. "We are fighting together against terrorism. Coexistence = safe cities."
No van a criminalizar a la comunidad musulmana. Luchamos juntos contra el terrorismo.- Ahora Madrid (@AhoraMadrid) March 22, 2016
Convivencia = ciudades seguras pic.twitter.com/NFMCN78iBd