A tweet sent by pro-independence blogger Stuart Campbell was homophobic because it "considers gay people to be lesser", former Scottish Labour leader Kezia Dugdale has told a court.
Mr Campbell is suing Ms Dugdale for defamation after her newspaper column described the tweet as homophobic.
Ms Dugdale said she had a responsibility as a gay politician to "call out" homophobia.
And she said it remains her "honest view" that the tweet was homophobic.
Ms Dugdale was giving evidence during the second day of a hearing at Edinburgh Sheriff Court.
The case centres on a tweet posted by Mr Campbell, who blogs as Wings Over Scotland, during the Scottish Conservative conference on 3 March 2017.
Mr Campbell, who is seeking £25,000 in damages, wrote that Conservative MSP Oliver Mundell "is the sort of public speaker that makes you wish his dad had embraced his homosexuality sooner".
Mr Mundell's father, Scottish Secretary David Mundell, had announced in January of the previous year that he was gay.
In a subsequent Daily Record column, Ms Dugdale said she was "shocked and appalled" by the "homophobic tweets" from Mr Campbell, who she said "spouts hatred and homophobia towards others" from his Twitter account.
She later raised the issue at First Minister's Questions in the Scottish Parliament, where she said her column had "called out Mr Campbell for his homophobic comments" and urged SNP MSPs to shun him.
In her evidence to the court, Ms Dugdale said that a "healthy democracy" should have a range of views, but that Mr Campbell's tweet crossed the line into discrimination as it "considered gay people to be lesser because they can't have children" - something which she said was not the case.
Oliver Mundell is the sort of public speaker that makes you wish his dad had embraced his homosexuality sooner.— Wings Over Scotland (@WingsScotland) March 3, 2017
The Lothians MSP also said the tweet had been reported "all over the printed media" before her article was published, and there had been "quite a hostile reaction" to it.
She said that "lots of people considered the tweet to be homophobic and offensive".
She added that she had, as a gay woman, encountered homophobia in a number of forms, and that it remains her "honest" view that Mr Campbell's tweet was homophobic.
And she said "people are entitled to their view of what is homophobic", and that as a gay woman she has the right to hold a view on whether something is homophobic.
Ms Dugdale also insisted that it was only Mr Campbell's tweet that she had described as homophobic, and that "I've never called him a homophobe".
The Labour MSP was the only witness to give evidence on Tuesday, but the case will call again on Wednesday morning for further legal submissions to be made.
David Mundell had been expected to appear as a witness, but was excused by the court after he said he could not attend "due to Brexit".
On Monday, Mr Campbell told the court that he had been "absolutely horrified" to have been accused of homophobia by Ms Dugdale.
He said the tweet was intended as "satirical criticism" of Scottish Conservative MSP Oliver Mundell's public speaking skills, and that anyone who considered it to be homophobic was either "dishonest or stupid".
Mr Campbell, who lives in Bath in Somerset, said: "I don't believe any intelligent person could honestly interpret that tweet as homophobic, given what it said."
He added that he was a "firm advocate of equal rights for gay people", and that anyone who had read his Twitter feed or website would find it "ludicrous" to think he was homophobic.
His position was backed by fellow pro-independence blogger Paul Kavanagh, who blogs as Wee Ginger Dug and came out as gay in the 1980s.
Mr Kavanagh said: "(The tweet) was crass, it was tasteless, it was insulting. It was meant to be all those things.
"It didn't contain the sentiment that lesbian and gay people are less entitled to equality and that's why I believe it wasn't homophobic."
Mr Kavanagh also said that unionist politicians view Mr Campbell as "Satan", and said being regarded as homophobic would "destroy your credibility" as a blogger.
But another witness, Stonewall Scotland director Colin Macfarlane, told the court he agreed with Ms Dugdale that Mr Campbell's tweet was homophobic.
He said: "I think it was wholly unnecessary to reference David Mundell's sexual orientation when the tweet was purported to be about Oliver Mundell's public speaking abilities."
Mr Macfarlane said the tweet used "sexual orientation as the punchline", which showed a negative attitude towards gay people.