I'd first experienced Muslim-majority Malaysia's diversity as I rubbed shoulders with the Islamic Malays and Buddhist, Taoist and Christian Malaysian-Chinese in the city of Melaka, all watching a sprawling procession during the Hindu festival of Thaipusam.

The Malay and Malaysian Chinese locals were as openly curious as I was about the festival. Wrapped in saffron or yellow robes, with flower garlands of white, purple and yellow, many hundreds of devotees surged past the Sri Poyatha Moorthi Temple. Some worshippers had pierced their cheeks from side to side with ceremonial skewers, while others were erratically pacing the narrow street in a trance-like state. I was so transfixed that I barely registered the procession also passed a mosque. Later, I saw that a Buddhist temple, a traditional Chinese temple and a Methodist church were just a stone's throw away.

This unusual proximity of ethnicities and places of worship is, in part, down to geography. The Malacca Strait that divides Peninsular Malaysia and the Indonesian island of Sumatra is the main shipping route between the Indian Ocean and the Pacific Ocean, and has been the conduit for religious and cultural exchange between East and West for thousands of years.

In addition, the coastal city of Melaka, located on the Malacca Strait – as is Penang’s capital, George Town – was a critical commercial and strategic port for the British Empire in Southeast Asia. With the influx of immigrants looking for work, Melaka and George Town became even more diverse fusions of language, culture and religion.

Indeed, on awarding Melaka and George Town World Heritage Site status in 2008, Unesco said that the cities were “living testimony to the multicultural heritage and tradition of Asia, and European colonial influences.”

George Town in particular has a large Chinese community and a history of religious toleration. The 18th-century founder of the British colony, Captain Francis Light, proposed that “each race has a right to preserve its civil and religious peculiarities.” In fact, 200 years ago, George Town saw the establishment of the first non-denominational school in Southeast Asia, the Penang Free School, which offered the choice of education in English or in the pupil’s mother tongue – extremely unusual at the time.

Because of this notable tolerance between cultures and religions, the Penang Global Ethic Project, a collaboration between academics and activists that encourages dialogue between different faiths, has been working to promote the city as the modern home of the ancient “golden rule” – a principle found in various forms in all world religions of treating others as you wish to be treated yourself.

To learn more, I contacted Anwar Fazal, chairperson of the Penang Gandhi Peace Centre and partner of the Penang Global Ethic Project.

Penang has a strong tradition of multiculturalism. It’s truly a beacon for the outstanding values of peace and compassion.

“Penang has a strong tradition of multiculturalism. It’s truly a beacon for the outstanding values of peace and compassion. Yes, there can be tensions. But it’s like Martin Luther King once said, ‘We may have all come on different ships, but we’re in the same boat now,’” he said.

Fazal told me how, since the 2006 inception of the Penang Global Ethic Project, dozens of George Town locals have been trained through the Penang Heritage Trust, a local NGO, to spread the word of the “golden rule” by acting as walking guides around George Town’s historical sites. The guides are focusing on the place known as the “Street of Harmony”, where, as in Melaka, mosques, churches and temples are packed tightly together. Drawn from all the ethnicities and faiths of Malaysia, these guides have been taught about religions different to their own and share their knowledge with other locals and visitors.

Alongside the work of the guides, Fazal and his colleagues from local civil society organisations and NGOs have been delivering workshops for religious and community leaders explaining how the “golden rule” can be used to promote peace and religious toleration.

“Our advocacy is gentle and targeted and we hope it will grow from person to person. We just spread the idea to anyone, anytime, anywhere,” Fazal explained.

This gentle approach isn’t surprising. While the Malaysian constitution protects the rights of individuals to practice their own religion, it confers a special status on Islam as the official state religion – which means that attempting to convert a Muslim to a different faith is illegal.

I decided to visit the Street of Harmony for myself to see the history that has helped the “golden rule” blossom in George Town. The 500m-long route, one of the four original streets of the historical settlement, is now officially known as Jalan Masjid Kapitan Keling. It runs south from the northeastern tip of George Town through the heart of the city, passing through the sites of George Town’s historical European, Chinese, Indian and Malay communities, who have co-existed here for more than 200 years.

The street was alive with the sound of commerce. Street vendors and trishaw drivers lustily plied their respective crafts, while the traffic edging along the busy thoroughfare was surrounded by everything from moneylenders to jewellers to motorbike sellers.

This seemed appropriate. It was the opportunity for profitable trade, after all, that for hundreds of years had brought immigrants of all faiths from across the world to George Town. The Street of Harmony today remains a hub for the exchange of goods and ideas – and with the philosophy of the “golden rule” at their disposal, the people here are well equipped to maintain their historical, cultural and religious equanimity.

If you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.