A Green Party local leader has stepped down after his role as mediator in a proposed voter scam involving a mosque and up to 3,000 votes was revealed.

The Conservative Party in the Swedish town of Botkyrka has been offered thousands of Muslim votes in exchange for a new building permit for Alby Mosque. Remarkably, the contacts were communicated by a senior member of their archrivals, the Green Party, national broadcaster SVT reported.

According to SVT, Conservative councilwoman Stina Lundgren and her secretary's visit to Alby Mosque in June took an unexpected turn, when they were told that the Islamic community could give them as many as 3,000 extra votes in the upcoming election, should they agree to grant building permits for a new mosque. Local imams would then urge the congregation to vote Conservative during Friday prayers.

READ MORE: 'No Time to Google', Swedish City Council Explains Funding of Islamist Movement

The Conservatives revealed that the meeting had been arranged by the Greens leader in Botkyrka Ali Khalil.

"People visit the mosque every Friday, and this audience is very responsive to the imam. Once he says 'It's our judgment that the Conservatives are the best choice for us, they are listening to our problems, they have promised to fight them and secure our existence,' then the people will do it," Khalil explained the affair in a secretly recorded conversation.

In another meeting with the representatives of the mosque followed by an SVT journalist pretending to be a party colleague, the church leader promised to generate 500 to 1,000 votes at short notice.

"Needless to say, we were completely shocked. We did not expect it at all," Stina Lundgren said. Her party rejected the offer, despite spending 24 years in opposition in the "red-green" municipality.

READ MORE: Sweden's Largest Party Caught Peddling Lies About Right-Wing Rivals in Arabic

"This is a variant of political corruption. It is direct voice purchase in its clearest form," political scientist Bo Rothstein said. According to him, this phenomenon is not illegal per se, but is quite widespread in other parts of the world where democratic traditions are weak. By his own admission, he is not aware of similar cases in Sweden.

Even more confounding is a political opponent acting as a mediator.

"This indicates a dramatic loss of party loyalty in this municipality," he said.

READ MORE: Swedish Right-Wing Party Claims YouTube 'on Offensive' Amid Mass 'Censorship'

Following the scandal, the Green Party informed that Ali Khalil will abandon all assignments within the party and the municipality. Until recently, Khalil served as vice president of the labor market and adult education board.

"We're distancing ourselves from his actions, this is unheard of. This is a shock to all of us," a Greens secretary in Botkyrka told the Nyheter Idag news outlet.

Botkyrka is a municipality in Stockholm County with about 90,000 inhabitants. As of 2015, first and second-generation immigrants constituted 57 percent of its population.