Father and son had always been close, from the moment Tim Schaefer was born, six weeks premature, with blood poisoning, a weak heart and lungs, and a doctor who thought he would not make it through the night.

His father, the Rev. Frank Schaefer, a United Methodist minister, thought of his eldest son as a miracle child, saved by some combination of medicine and prayer, saved for something special.

“We couldn’t even touch him; he was in an incubator, and we had to reach in with latex gloves through those holes in the sides,” Schaefer said. “I begged God to please save his life.”

Their bond was such that, years later, facing a choice between upholding his church’s teaching and affirming his son’s sexual orientation, Frank chose to endanger his own career by officiating at his son’s same-sex wedding. The actions that followed – a rebellion in his congregation, a church trial, a defrocking and then, last month, a reinstatement – have made the Schaefers symbols of the conundrum facing much of American Christianity: How does religious doctrine on homosexuality respond to the longings for spirituality and community from congregants and family members who are gay?

“His own church was saying to him that, as a homosexual, you can’t go to heaven,” said Frank Schaefer, 52. “That’s not necessarily what the church would officially say, but that’s what he heard, and it devastated him because faith had always been very important to him. I remember how I said to him: ‘It’s so obvious you did not choose this for yourself. This is who you are, and this is who God created you to be. You are created in the image of God, just like everybody else.’ ”

In a series of recent interviews, by telephone and in Washington, where they attended a gay pride event with President Obama at the White House, father and son described their separate and shared crises of love and faith, which began in 2001 when Tim, then in high school, acknowledged to his parents that he was gay.

Frank Schaefer and his wife, Brigitte, told their son that they loved him and accepted him as he was, but there were fears, too. Would he be bullied? Would he get AIDS? What about grandchildren? And had they done something wrong?

Six years later, Tim’s decision to marry, shortly after college, was to be the next crisis, and when the moment came, father and son knew it.

“Who wouldn’t want their own family member to perform the ceremony; it’s so much more special,” Tim Schaefer, now 30, said in explaining his decision to ask his father to officiate, despite the risks. “My only pastor, ever, had been my dad.”

Frank Schaefer recalls immediately accepting the offer, knowing the likely consequences.

“When he said, ‘Dad, will you perform my wedding?’ it was a no-brainer for me,” he said. “I was honored and overjoyed that he had asked me. It was only after I had hung up that I said, ‘What does this mean for me as a United Methodist minister?’ Gay marriage is a punishable offense, by trial and defrocking, so I expected to be fired.”

Frank Schaefer told his supervisors that he was officiating at the wedding in 2007, and nothing happened. He did not tell his congregation, but on Father’s Day in 2008, he gave a sermon on unconditional love in which he acknowledged that his son was gay. In the ensuing years, a group of congregants accused him of sexual misconduct and financial misconduct. When neither of those complaints was substantiated, one was filed accusing him of violating church law by performing Tim’s same-sex marriage.

By the time of the trial, last December, Tim Schaefer’s marriage was falling apart, which made his father’s defrocking doubly painful.

“There was a moment when I thought my dad’s gone through all of this for nothing,” Tim said. “You’re letting yourself down and you’re letting God down when you go through a divorce. But it is what it is.”

Frank Schaefer said he was sad but not regretful. “I would always have done what I did,” he said.

Tim Schaefer said his father’s trial and its aftermath, difficult as that period was, also heartened him by making him more aware of the varying views in the United Methodist Church. The denomination is divided over sexuality issues, and although it has rules that ban the ordination of “self-avowed practicing homosexuals” and the celebration of same-sex marriages, hundreds of clergy have said they are willing to officiate at the ceremonies in violation of church law, and 36 who blessed a same-sex wedding to show support for Frank Schaefer now face a disciplinary process themselves.

Also, more than 600 congregations have declared that they welcome people of every sexual orientation, and several bishops have challenged the church’s teaching, including one in California who offered Frank Schaefer a job the day after he was defrocked.

Now Frank and Tim Schaefer are recommitting to their relationship with the United Methodist Church, or at least with Christianity. Frank Schaefer, who has three gay children and a straight son, has become a sought-after speaker on gay rights and an advocate for change; a church appeals panel ordered him reinstated as a minister last month, and he has accepted a church position ministering to the university community in Santa Barbara, Calif. And Tim Schaefer, who resumed attending United Methodist Church services after discovering that his local congregation in Hull, Mass., was not only welcoming of gays but was also led by an openly gay pastor, has decided he wants to follow his father into ministry.

“Right after the trial, it sort of restored hope in me, when you were getting calls from churches, and you could see there is this grass-roots movement for inclusion,” Tim Schaefer said to his father during a joint interview. “I had a renewed sense of calling, where I kind of feel I have to carry on your legacy, to be honest, as an advocate for the LGBT community.”