A GAY minister whose appointment sent shockwaves through the Kirk said a struggle "to find self-acceptance" may have driven the Orlando shooter.

Reverend Scott Rennie, of Aberdeen, condemned homophobia as he wrote of how it can be "tortuous to grow up knowing that you are different".

Rev Rennie, who is now married to his long-term partner David Smith, a university lecturer, sparked a row over gay clergy when he became minister of Queen's Cross Parish Church in Aberdeen in 2009.

Read more: Agenda - Rev Scott Rennie on the Orlando shooting

Hundred of ministers and thousands of Church of Scotland members signed an online petition opposing his appointment, but Rev Rennie was backed by his congregation.

In a column for the Herald, Rev Rennie said that the massacre at Orlando gay club, Pulse, may have been motivated by the Muslim killer's loathing for his own secret sexuality.

Rev Rennie said: "Omar Mateen seems to have been a regular visitor to this nightspot; even if reports suggest he was a bit of a loner once there.

"From the reports of his family, and friends, he certainly seems to have had his struggles in life.

HeraldScotland:

"His first wife is reported in the US media this week to have suggested he had struggles with his own sexuality.

"Who knows? Perhaps, this tragic spree of death was rooted in the pain of an inability to find self-acceptance?"

It comes amid reports in US media that Mateen - who murdered 49 people in a shooting spree at Pulse on Saturday night before being killed by the police - was a closet homosexual who used gay dating apps and frequented gay bars, including Pulse.

Read more: Agenda - Rev Scott Rennie on the Orlando shooting

His first wife Sifora Yusufiy, said he had confessed to a secret past before their arranged marriage, and that he had "very much enjoyed going to clubs".

The couple divorced in 2011 and Ms Yusufiy claims Mateen was abusive and unstable.

Orlando local Kevin West said he had exchanged online messages with 29-year-old Mateen for more than a year via gay dating apps, but they never met in person.

Mr West said he was dropping off a friend at Pulse on Saturday when he bumped into Mateen for the first time, around an hour before the shooting.

Read more: Agenda - Rev Scott Rennie on the Orlando shooting

Mr West said: “He walked directly past me. I said, ‘Hey,’ and he turned and said, ‘Hey' and nodded his head.”

Mateen's father, Mir Seddique, initially linked the attack to an incident in the city months before where his son was disgusted at the sight of two men kissing.

Rev Rennie said the "possible internal struggle" faced by Mateen would be familiar to many in Scotland's LGBT community, adding that homophobia "remains stubbornly present in Scotland’s cultural, religious, and sporting communities, not to mention in its workplaces".

Last month, seven years on from the controversy over Rev Rennie's appointment, the General Assembly finally settled the issue when it voted to allow ministers and deacons who are in same sex marriages to continue to serve the Kirk.

Rev Rennie added: "It can be tortuous to grow up knowing that you are different - unable to be at peace with oneself because your home, school, faith and community culture tell you that you are not ‘normal’, or are in some ways ‘wrong’ ...

"It falls upon all of us to do what we can to build a society where people are able to be fully human - accepted, loved, and clothed with human dignity."