The pair took the matter to the High Court after their challenge was dismissed first by the Victorian Civil and Administrative Tribunal (VCAT) and then the State Court of Appeal.
The group behind the mosque, Australian Muslims of Bendigo, said the decision was fair.
“We believe the decision is in line with every Australian’s constitutional right to practise their faith,” it said in a statement.
There were large protests in Bendigo over the plan last year, with opposing groups facing off against each other.
The Australian Islamic Mission applied in November 2013 to the Greater Bendigo City Council for the planning permit to build the mosque on Rowena Street at East Bendigo.
It was first approved by the council in June 2014 and a series of appeals have since been launched.
Debate around the mosque led to controversy and some divisions within the town and large protests were held in the centre of Bendigo in October last year.
One of those who made the appeal, Julie Hoskin, said the legal process had so far has cost more than $200,000, which was mostly crowd-funded.
“We’ve exhausted our avenues which is what we needed to do, and again the High Court was always a long bow,” she said.
“We knew that was going to be very difficult to get into and they’ve said no, and I understand that.”
Victoria a place that welcomes diversity: Andrews
Premier Daniel Andrews said the majority of Victorians believe that multiculturalism is our “greatest strength”.
“That’s the story of Bendigo and the story of so many other parts of Victoria,” he said.
“I welcome the fact that Bendigo can have places of worship for people of all faiths to come together in celebration of the brilliant diversity that marks us out, not just as a place that tolerates diversity and multiculturalism, we celebrate it.
“We’re much, much stronger because of that.”
Mayor of Bendigo Rod Fyffe said the court decision had vindicated the work of the council.
“We’re very pleased that it’s come down in favour of the fact that the mosque can go ahead and we have been exonerated in following all of the procedures as set out by Victorian law,” he said.
It really has been a long process, a difficult process, and I pay tribute to the council who has stood by the decision they made.
“I think that today’s decision just says to them, ‘you’ve done it right, congratulations.'”
Landmark decision hailed
Prue Mansfield, director of planning and development for the city of Bendigo, said there would always be differences of opinion.
“It’s how we respond and respect that, be that in the pub down the street, in the footy room or in our workplace,” she said.
“That way we’ll have a really strong and thriving community that’s welcoming for everyone and everyone feels at home and to be respectful in that way.”
Local community group Believe in Bendigo, led by local identity Margot Spalding, congratulated the High Court and in a Facebook post said it was time to celebrate the city for what it is, not what it had been portrayed as.
“The line has now been drawn and it is time to move on,” the Facebook post said.
“This decision is a landmark day in Bendigo’s history, but it is not the end of something, it is the start of something magnificent.
“We are a diverse, welcoming and inclusive community that celebrates the contribution every culture makes to Bendigo life.
“Whatever country you are from, whatever religion you practice and whatever culture you celebrate, you are welcome in Bendigo.”
Mosque opponents ‘disgusted’
Not everyone welcomed the decision.
A Facebook post on the Stop the Mosque in Bendigo page, which has more than 28,000 likes, said the ruling was a “sad day for Australia”.
One comment on the post said Bendigo would “soon be a noisy, violent, fetid no-go zone.”
Another said the decision was “absolutely disgusting” and asked when the people in power would “listen to what the majority of ordinary citizens want and expect”.
According to Australian Muslims of Bendigo, there are about 300 Muslims living in Bendigo, including international students.
It said the mosque would hold a maximum of 375 people and include a sports facility and library.
“The Bendigo Islamic Centre will be a great asset to Bendigo. It will be a centre for understanding, education and cross cultural and inter-faith dialogue,” the group said.