Two CBC journalists covering violent anti-government protests in Turkey have been released from detention in Istanbul.
"We're out," Sasa Petricic tweeted just before 4 a.m. local time Thursday.
"My exclusive 'tour' of the Turkish justice system is over!" Derek Stoffel added.
Mr. Petricic and Mr. Stoffel had been detained by police on Wednesday and held all day, prompting Ottawa to demand their immediate release.
CBC News editor-in-chief Jennifer McGuire said the two journalists had met with Canadian consular officials in Istanbul and spoke to their lawyer before giving statements to police.
Their release was due, in part, to behind-the-scenes work by Foreign Affairs Minister John Baird and the Turkish ambassador to Canada, Tuncy Babali, the CBC reported.
"Pleased to hear @CBCNews journalists have been released in #Istanbul," Mr. Baird tweeted. "Thanks to the Cdn Consul General and the Gov't of Turkey, including Amb. Babali, for their co-operation in this matter."
The two journalists had been tweeting photos and observations from Istanbul when the flow of information ended around 6 p.m. local time with a single tweet from Mr. Petricic's account.
"Arrested," he tweeted.
Mr. Stoffel's last tweeted message before his detention included a photo of heavy machinery clearing out barricades erected by protesters near Taksim Square.
The reporters appeared to have regained access to their cellphones about an hour after their arrests were confirmed and both tweeted about being detained.
"Sasa and I are OK. In police custody but OK. Thanks for kind words. Will lose mobile phones very quickly so good night," Mr. Stoffel said on Twitter.
"All good so far. Going through the Byzantine (literally) process! Thanks everyone," Mr. Petricic added.
The House of Commons unanimously approved a motion brought by Liberal MP Bob Rae that condemned the arrest and detention of the two reporters.
Reporters Without Borders released a statement on Wednesday saying it was "becoming increasingly concerned about the dangerous climate for journalists covering Turkey's protest movement."
In January, the rights group described Turkey as "the world's biggest prison for journalists" and ranked the country 154th in its 2013 Press Freedom Index.