The official websites of the Finnish foreign and defence ministries were both down for several minutes on Friday.
Finland's government says that its websites were targeted in a cyberattack during a speech to parliament by Ukraine's President Volodymyr Zelenskyy.
The official pages of the Finnish foreign and defence ministries were both down briefly on Friday afternoon.
The foreign ministry later confirmed in a statement that it had been hit by a "denial of service attack" (DDOS) attack.
The website was first affected at around 12:00 but was soon "returned to normal" within an hour, the ministry added.
"The Ministry of Foreign Affairs has taken measures to limit the attack in cooperation with service providers and the Cybersecurity Centre."
Helsinki did not say who was behind the attack or give further details.
A DDOS attack is a malicious attempt to disrupt a website and prevent it from functioning by overwhelming it with internet traffic and activity.
These differ from ransomware cyberattacks, where hackers might ask for payment to unlock files they have accessed.
The cyberattack hit the Finnish government during Zelenskyy's video address to the country's parliament.
During his speech, Ukraine's President repeated his call for "powerful" sanctions against Russia following the invasion on February 24.
"We need the weapons that some of our partners in the European Union have," Zelenskyy told Finnish MPs.
The Ukrainian leader called for Europe to launch a "Molotov cocktail" against Moscow, referring to the firebombs that were widely used by Finnish resistance against the former Soviet Union during World War II.
"Russia's war against Ukraine is decisive not only for the future of our country but also for all those who share a border with Russia, as you did 83 years ago," Zelenskyy said.
Finland -- which has a border of more than 1,300 kilometres with Russia -- is considering joining NATO following the outbreak of war.
On Friday, Finland's ministry of defence also reported that a Russian government aircraft had briefly violated its airspace.