It was "like a can of sardines."

That's how Naeem Malik remembers what it was like when Ottawa's founding Muslim community prayed in the basement of Northwestern United Church in the late 1960s.

The United Church's Scott MacCrimmon, left, and Malik shake hands after a preview of the Northwestern United Church building before the sale goes through in June. (CBC)

The Muslim community went on to build its own mosque — Ottawa's first — right next door to the little church.

Now, in a deal worth $1.5 million, they're poised to move back in to the church, but this time as the new owners.

The head of the United Church committee selling the property, Scott MacCrimmon, says despite offers from other Christian organizations and housing developers, they signed with the mosque in part because of the historic relationship between the two groups.

"We looked at what was the greater good for the larger Ottawa community," explained MacCrimmon.

Relationship goes back 55 years

Ottawa's Muslim community in the early 1960s numbered no more than 100 people — about a dozen families — according to Malik, who helped found the Ottawa Muslim Association at a meeting at the old Bingo Hall on Bank Street in 1962.

"I used to pray at home, and we were looking for a place," he said.

Breaking ground at Northwestern United Church in April 1964. (Photo courtesy of Marion Reid)

Former minister Brian Cornelius wrote a book on the United Church in Ottawa and documented the story of how the two communities came together under one roof.

"A friend of Reverend [Ken] Woodwark ... asked if he knew of any place Ottawa Muslims could meet for worship. Woodwark suggested Western [United Church on Bronson Avenue] and early in 1961, the Muslims began to use Western's basement," wrote Cornelius.

Malik said it "was really nice of them," and the arrangement suited the nascent Muslim community at the time.

But when the Western United Church on Bronson Avenue closed a year later, several United Church congregations amalgamated and moved into a brand new church called Northwestern United Church north of Scott Street.

The church invited the Muslims to continue to pray in the basement at the new location.

Basement space soon too crowded

Some of the original parishioners at the church remember the Muslims who rolled out their carpets to pray after church services on Sunday. On a few occasions, Marion Reid said the Imam spoke at the pulpit to the United congregation.

The Ottawa Mosque, which was built in 1972 on Northwestern Avenue, required a crane to place the minaret. It's the only one in Ottawa that can be accessed for a call to prayer. (Ottawa Muslim Association)

"His sermon was about the things in our bible that were almost like what was written in the Qur'an and that amazed me, because I had lived a sheltered life until then," said Reid.

The basement of the church soon became too small, as the numbers ballooned to about 500 people by 1970.

And so began the project to build Ottawa's first mosque.

Tight relationship between communities

"Some people said you will never build a mosque in this city," said Malik. "But that wasn't God's plan."

There was cheaper land further away from the downtown, but two cottages came up for sale right beside the United Church.

The clean-up crew at Northwestern United Church is tasked with getting the church ready for sale. (Amanda Pfeffer/CBC)

Some say the Muslim community bought the more expensive piece of real estate beside the church because of their enduring relationship.

Malik remembers more practical reasons, including accessibility to public transit for members of the community.

Over the years the two communities continued to have a tight relationship. They were invited to each other's dinners, special events and sales.

Former parishioner Margaret Hall remembers being invited by women from the mosque to participate in prayers.

"It was something I wanted to experience, the way they practiced their faith. I remember it was long. I wasn't used to being down on the floor like that for so long," she laughed.

"But I stuck it out, and I hope that it was something that they appreciated or recognized that I was trying to share that experience with them."

There have been irritants in the relationship with nearby residents, particularly over traffic and parking, as hundreds and then thousands of Ottawa Muslims attended Friday prayers, but Malik says they've learned to live together.

Sale accommodates Muslim law

Attendance at the mosque continued to grow, and 10 years ago, a $1-million extension was added to the building.

But the demand for space is increasing with about 5,000 people showing up to the mosque on high holidays.

The stained glass moved from the original United Church on Bronson (right) to the new location on Northwestern Avenue (left). (Supplied)

"And now once again we are too small," explained Malik. And instead of building another extension, the mosque looked to their former home.

"It sounded like it was a very ecumenical kind of process, and wonderful, and because we'd had these contacts with them before I just felt it was a natural thing," said Hall.

The purchase of the church involved mostly cash donated by members of the mosque and gifts from a number of embassies. A portion of the purchase involves a no-interest loan from the church, because paying or charging interest is forbidden in Muslim law.

Church to become community centre

The mosque intends to turn the church building into a Muslim community centre with services for women and young people, with plans to call the building the Hall of Peace.

MacCrimmon said that suited the selling committee, which had made up a list of criteria before considering the sale of the very lucrative piece of land.

"I must admit, it certainly appealed to me; it was nice to think of this building going back to them," he said.

The church hopes to salvage the original stained glass windows on either side of the pulpit, as they were brought in from the old Western United Church. The large stained glass on the front of the building featuring Jesus cannot be salvaged, however, because it is part of the structure of the building.

Parts of the old organ have been retrieved, but much of it has to be thrown out.

Still, Reid says that while she's sad to see her house of worship go, she's comforted with where it's going.

"It will still be doing God's work and looking after people and that's what we wanted when we built it," she said. "We only have one God; he's looking after everybody and I never doubted the same God looking after us is looking after them."