It was around this time last year that the trustees of Bradford's final remaining synagogue faced a tough choice. The roof of the Grade II-listed Moorish building was leaking; there was serious damage to the eastern wall, where the ark held the Torah scrolls; and there was no way the modest subscriptions paid annually by the temple's 45 members could cover the cost.

Rudi Leavor, the synagogue's 87-year-old chairman, reluctantly proposed the nuclear option: to sell the beautiful 132-year-old building, forcing the congregation to go 10 miles to Leeds to worship.

It was a terrible proposition, coming just after the city's only Orthodox synagogue had shut its doors in November 2012, unable to regularly gather 10 men for the Minyan, the quorum of 10 Jewish male adults required for certain religious obligations.

But rather than close, Bradford Reform Synagogue's future is brighter than ever after the intervention of Bradford's Muslim community, which according to the 2011 census outnumbers the city's Jews by 129,041 to 299.

A fundraising effort – led by the secretary of a nearby mosque, together with the owner of a popular curry house and a local textile magnate – has secured the long-term future of the synagogue and forged a friendship between Bradfordian followers of Islam and Judaism. All things being well, by Christmas the first tranche of £103,000 of lottery money will have reached the synagogue's bank account after some of Bradford's most influential Muslims helped Leavor and other Jews to mount a bid.

This burgeoning relationship is perhaps unexpected. When David Ward, one of the city's MPs, had the Liberal Democrat whip withdrawn over disparaging remarks about "the Jews" and Israel as an "apartheid state", he was publicly supported by many of his Muslim constituents. George Galloway, the Respect MP for Bradford West and an open opponent of Israel, has organised convoys to Gaza and was praised by many of his voters after refusing to engage in a debate with an Israeli student at Oxford University earlier this year.

The cross-cultural co-operation is warmly welcomed by Leavor, who moved to the city from Berlin as a refugee in 1937. "It's fantastic," he said this week, in a joint interview with Zulfi Karim, secretary of Bradford Council of Mosques. "Rudi is my new found big brother," said Karim, who is on the board at the central Westgate mosque a few hundred metres up the road from the synagogue. "It makes me proud that we can protect our neighbours and at the same time preserve an important part of Bradford's cultural heritage."

Now the two men get on so well that when Leavor goes on holiday he gives the synagogue keys to Karim, as well as the alarm code. They have begun what they hope will be a lasting tradition, whereby the Jewish community invites local Muslims and Christians to an oneg shabbat (Friday night dinner) and Muslims return the invitation for a Ramadan feast and Christians during the harvest festival. For the latter, Karim provided halal mince for the shepherd's pie.

At the start of December, Karim and other Muslims attended a hanukah service at the synagogue. Yet until a year ago, Karim didn't even realise the synagogue existed. "The Jewish community kept themselves to themselves," he said. Since the last race riots in the city in 2001, there has been no sign to mark the building. "We didn't want to be the cause of potential trouble, so we took the plaque down over 10 years ago," said Leavor, who said there was an incident a few years ago when one man left the synagogue wearing his kippah, or skull cap, and was spat at by two Pakistani men passing in a car.

The Muslims only started to help the synagogue by chance, explains Leavor. He had been approached by Zulficar Ali, owner of Bradford's popular Sweet Centre restaurant, which is just a few doors away from the synagogue. Ali wanted Leavor to help oppose a planning permission for yet another curry house in the area. Leavor agreed and together managed to block the application. Ali then introduced Leavor to a local social enterprise, the Carlisle Business Centre, which awards grants to worthy causes. They gave several hundred pounds for emergency roof repairs, and a local businessman, Khalid Pervais, donated a further £1,400.

It was only after getting involved that Karim learned that the mill where his father worked after emigrating from Pakistan in the 1960s was run by a Jewish descendent of Joseph Strauss, the rabbi who founded the synagogue in 1880.

Once all of the lottery funding comes through, together with £25,000 pledged by Bradford Council, work will begin to renovate the synagogue. The kitchen will be cleared up, disabled access will be improved and it will open for educational visits from school groups throughout the week. Karim is convinced such initiatives will help build tolerance. "You look at those who killed Lee Rigby, supposedly in the name of Islam. The question is: what makes these young men so radicalised, so angry, so intolerant? I really, really deeply, strongly feel that the way forward is interfaith dialogue – perhaps through food, perhaps through visiting a synagogue or other places of worship."

This article originally appeared on guardian.co.uk