OTTAWA -- Canada has learned a lot about how to protect against foreign election meddling through its support of Ukraine in its ongoing battles with Russia, says Foreign Minister Chrystia Freeland.

Freeland described Ukraine as a "laboratory" for Russia's disinformation campaigns in cyberspace as she and Defence Minister Harjit Sajjan announced Monday that Canada is extending its military missions in the eastern European country and Iraq -- commitments that were both due to expire at the end of the month.

The extensions shore up Canada's contributions to the effort to curb Russian aggression in Eastern Europe and to the fight against Islamic militants in the Middle East.

Ukraine is bracing for Russian interference in its upcoming presidential election on March 31, and Freeland said the threat has implications for Canada's own federal vote later this year.

"We do need to be concerned about malign actors seeking to interfere in the elections in Ukraine and seeking to interfere in our own elections. That is all the more reason for us to be very active in countering this threat," she said. "Ukraine tends to be a laboratory for malign intervention and disinformation."

Canada is committed to helping Ukraine and its neighbours counter the cyberthreats from Moscow, and broader disinformation campaigns, the minister said.

"We help them a lot, but I'll tell you, we learn a lot from them."

The mission of about 200 Canadian Forces personnel in Ukraine will be extended to the end of March 2022.

The Forces have been involved in Ukraine since September 2015, helping train the country's military, which is battling Russian-backed separatist forces.

The decision to extend Canada's commitment was welcome news to Ukraine as it continues to cope with Russia's annexation of its southern Crimea region in 2014, and the continuing unrest in its eastern Donbass region, which is plagued by a pro-Russian rebellion.

Ukrainian Ambassador Andriy Shevchenko said cyberattacks by Russia have become an everyday occurrence as the election nears.

"There are constant cyberattacks on the Ukrainian objects of critical infrastructure," he said in an interview. "We see massive cyberattacks on our election digital infrastructure, and our media sector."

Shevchenko said his country is "like a workshop where you can see in real time how our neighbour is trying to interfere with our election."

Canada has trained almost 11,000 Ukrainian military personnel, with techniques that have helped save many lives on the front line of the conflict with Russia, he said.

Shevchenko said Canada's military commitment to his country shows global leadership. He also cited Canada's contribution of election monitors and Friday's imposition of additional sanctions on 129 people, companies and organizations over Russia's treatment of Ukraine. Canada said the measures were a response to the ongoing occupation of Crimea and the Russian arrests of 24 Ukrainian sailors in the Black Sea last November.

Former foreign-affairs minister Lloyd Axworthy is leading a delegation of Canadian election monitors to Ukraine.

Canada will also host an international conference on Ukraine's economy and political reforms in July that will include foreign ministers from the European Union, the G7 and NATO countries, Freeland said.

Canada also has about 500 troops leading a NATO battlegroup in Latvia, part of the alliance's broader effort to deter Russia along Europe's eastern flank.

"For defence and deterrence to work, we need to make sure that Russia knows what our capabilities are. That's how deterrence operates," said Sajjan. "It's very important to send our NATO allies a very strong message that we will be there for them, but also to send a very strong message to Russia."

Canada will also extend the Canadian Forces' contribution to the Global Coalition Against Daesh and the NATO mission in Iraq, until the end of March 2021.

Canada has about 500 military members in Iraq, including 200 who are part of a NATO training mission and 120 special forces who have been helping Iraqi forces root out Islamic State insurgents around the northern city of Mosul.

Those are parts of Canada's larger Middle East strategy, which also includes humanitarian assistance and diplomatic engagement in Iraq, Syria and the surrounding region.