OTTAWA (Reuters) - Canada made mistakes in its dealings with Saudi Arabia which helped spark a diplomatic dispute, the former Canadian ambassador to Riyadh said in frank remarks on Wednesday.

In August, Saudi Arabia froze new trade with Canada, expelled envoy Dennis Horak and ordered all Saudi students home after the embassy issued an Arabic language tweet urging the immediate release of women’s rights activists.

“It was a situation that didn’t need to occur ... to sort of yell from the sidelines I don’t think is effective,” Horak said in a phone interview. Horak’s comments mark the first time a senior Canadian official has conceded Ottawa was partly responsible for the row.

Horak also said the Liberal government of Prime Minister Justin Trudeau - which continually stresses the importance of human rights - should have spent more time trying to improve ties with the Saudis.

The tweet in question was a translation of a message initially sent out from the foreign ministry in Ottawa.

Horak, now retired, said he did not know the tweet was going to be issued and would have advised against it.

“The urging of immediate release I think went too far,” he said, and described the Saudi government’s response as a “serious over-reaction”.

Gulf sources told Reuters that Riyadh considered the tweet to be a break with diplomatic norms.

Analysts say the Saudi response shows the limits of reforms by Crown Prince Mohammed bin Salman, who runs its day-to-day government. He has launched a campaign of social and economic change, but has not eased the absolute monarchy’s total ban on political activism.

Horak, noting the two nations have not had a particularly strong relationship in recent years, said whether or not ties improved would depend to a large extent on Riyadh.

Saudi Arabian Foreign Minister Adel al-Jubeir, speaking on the sidelines of a United Nations meeting, asked Canada on Sept. 26 to apologize for its actions and to stop treating the kingdom as “a banana republic”.

Horak, who was head of Canada’s diplomatic mission in Iran when the previous Conservative government cut ties with Tehran in 2012, said Ottawa needed to put more effort into talking with nations it did not always agree with.

“We’re wrong not to engage a country like Saudi Arabia,” he said.

“We yell via tweet or statement ... but in terms of trying to effect change, or trying to have any influence on those issues we’re interested in, it’s not effective because they have no investment in the relationship. So why would they listen to us?” he added.

In a statement, the office of Canadian Foreign Minister Chrystia Freeland referred to Horak as “a retired public servant” and said Canada would always stand up for human rights.

Saudi authorities were not immediately available for comment.