Mourners flocked to his funeral in Casper, Wyo., but so did protesters carrying derogatory signs.

His parents wrestled with a location for a burial after that, fearing it would be at risk of desecration. The family had considered other options, including spreading his ashes over the mountains and plains of Wyoming. But they settled on the cathedral because they wanted a place they could visit to talk to him.

And that is what his father during his speech on Friday encouraged others to do.

“Matt was blind just like this beautiful house of worship,” Dennis Shepard said. “He did not see skin color. He did not see religion. He did not see sexual orientation. All he saw was a chance to have another friend. Just like this beautiful home we have here right now.”

He thanked those gathering for “helping us take Matt home.”

Mr. Shepard and others who addressed the congregation emphasized that the cathedral was an inclusive, accepting place, whether they were religious or not, and regardless of their sexual orientation.

Rev. V. Gene Robinson, who became the first openly gay bishop in the Episcopal Church in 2003 but has since retired, gave the homily.

“If you close your eyes and open your hearts, Matt is right here,” he said. Then later, weeping, he said there were three things he wanted to say to Matthew:

“Gently rest in this place. You are safe now. Oh yeah, and Matt, welcome home. Amen.”

Bishop Robinson had been working with Mr. Shepard’s parents on issues affecting lesbian, gay, bisexual and transgender people for years. When Judy Shepard asked him about the possibility of interring her son’s ashes at the cathedral, he said, he helped to make it happen.