When Reverend Andre Reynolds, minister of music at the 16th Street Baptist church in Birmingham, Alabama, looks out to the congregation for inspiration, he occasionally lifts his eyes over the pews, beyond the balcony and sets his gaze on the Wales window.

"I think it's wonderful that people halfway around the world should choose to affiliate with both the accomplishments and the disappointments of African Americans," he says. "It just reminds us that the world is smaller than we think, and that there are brothers and sisters somewhere else who thought about us."

The story of how those "brothers and sisters" transferred those thoughts into actions, and produced an enduring testament to their solidarity in the face of tragedy, involves a white craftsman, a black Jesus, a campaigning editor and two Klansmen. It's a saga that starts with the murder of four black girls and ends with a little piece of Wales embedded in the heart of one of the most iconic venues of the American South.

On the morning of 15 September 1963, just after Sunday school at the 16th Street Baptist church, 15-year-old Carolyn McKinstry went upstairs to hand in some papers to the office. She heard the phone ring. "When I answered it the caller on the other end said, 'Three minutes'. As quickly as he said that he hung up. I stepped out into the sanctuary and took about 15 steps . . . when the bomb exploded."

Racist bombings were not extraordinary in Birmingham at that time. There had been more than 50 in the city during the civil rights era, all unsolved, earning it the nickname Bombingham among African Americans. And it was hardly a surprise that the assailants chose this church. Throughout the previous six months it had become the organising centre for the local civil rights movement, which had grown ever more strident.

But this bombing was different. It killed four young girls: Cynthia Wesley, Carole Robertson and Addie Mae Collins, all 14, and 11-year-old Denise McNair. Even for hardened segregationists, murder in a church was too much. But the outrage was not confined to the US. The revulsion was global. Four thousand miles away in Llansteffan, Carmarthenshire, artist John Petts heard the news. "Naturally, as a father, I was horrified by the death of the children," he recalled in 1987. "As a craftsman in a meticulous craft, I was horrified by the smashing of all those [stained-glass] windows. And I thought to myself, my word, what can we do about this?"

Back in Birmingham, African Americans assumed nothing would be done. Four men, who formed a splinter group from the Klan, called the Cahaba Boys, were identified as complicit in the bombing. It was 14 years before Robert Chambliss, a Klan member, was brought to justice: it would take 37 years before another, Thomas Blanton, was put behind bars. Bobby Frank Cherry was jailed for life in 2002. Another man died before charges were brought.

In Wales, Petts, who died in 1991, decided to offer the only practical thing he could – his skills as an artist. "An idea doesn't exist unless you do something about it," he said. "Thought has no real living meaning unless it's followed by action of some kind."

So he called David Cole, editor of the Western Mail, and shared his idea. Cole launched a front-page appeal the next day to raise the funds to replace the smashed window. "I'm going to ask no one to give more than half a crown," he told Petts. "We don't want some rich man as a gesture paying the whole window. We want it to be given by the people of Wales."

The campaign caught on, and soon the Mail was publishing pictures of black and white children in Cardiff's Tiger Bay, lining up to hand over their pocket money. Within a short time the money had been raised. Petts travelled to Alabama to get a sense of what the church wanted. "They had never heard of Wales," he said. "They had no idea where it was, but they were very quickly told something of the little country Wales was, and how it put great value on independence and freedom, to bandy with the great big words."

He returned home and struggled to come up with a design worthy of the occasion. "How could it begin to be near the huge issue that was involved at a Christian level – the problem of what we do to each other during the short time we have the gift of living on the earth?"

Then it struck him. A verse from Matthew 25:40 that spelt out the Christian message of brotherly love: "Truly, I say to you, as you did it to one of the least of these my brothers, you did it to me." Petts employed the last refrain: "You do it me". Once the words were in place, the image followed. The window was installed in 1965. It showed a black figure, his chest thrust out and arms outstretched as though on a crucifix, the right one pushing away hatred and injustice, the left offering forgiveness. A rainbow, representing racial diversity, arcs over the head. Christ. As a black man. In the South. In the 60s.

"The boldness – in this country – of having a black Christ speaks volumes. For the African American community that's not a stretch at all, but for many people in the white community during that time, to say that Jesus Christ was black and of African descent would be blasphemous," explains the present 16th Street pastor, Reverend Arthur Price. "But I think the major message we try to take out of the window is not so much identifying Christ's colour but knowing that Christ identifies with us. To the white community this is that the Jesus you love identifies himself with the African American community, so you are really crucifying him again when you persecute someone who does not look like you."

Today, the Wales window is embedded not just in the church's architecture but its identity. When visitors come from the Civil Rights Institute, an excellent museum cataloguing the era, just over the road, Petts's window is always part of the tour. The story the guides tell has been somewhat embellished: "When the children of Wales heard of the tragedy they saved their pennies to buy a new window." Roughly half the visitors I spoke to had heard of Wales (one thought it was London) – not a surprising number when you consider that Wales could fit into Alabama six times. But that's what, beyond the imagery, makes the window so powerful. Even as people geographically closest to them saw them as alien and inferior, people they didn't know existed not only identified them as fellow humans but sought to demonstrate support.

"I was surprised that people cared about blacks altogether," explains Kathleen Bunton, a member of the church and lifetime resident of Birmingham. "Because if you had encountered the situations that were going on here . . . it was as if nobody cared. Of course you want to feel, that I know God cares and he loves us all, but to think that another race would respond to this was very moving for me."

• Gary Younge presents The Wales Window of Alabama on Radio 4 on Thursday at 11.30am